Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2b37a60237f7c87f3e9c5049b2fcae12 > files > 3

cssparser-0.9.5-4.fc15.src.rpm

Name:           cssparser
Version:        0.9.5
Release:        4%{?dist}
Summary:        CSS Parser

Group:          Development/Libraries
License:        LGPLv2
URL:            http://cssparser.sourceforge.net/
# sh ./fetch-cssparser.sh
Source0:        cssparser-0.9.5.tar.lzma
Source1:        fetch-cssparser.sh
Patch0:         %{name}-javacc.patch

BuildArch: noarch

BuildRequires: sac >= 1.3-6
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: junit4
BuildRequires: javacc-maven-plugin >= 2.6-3
BuildRequires: maven-compiler-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-source-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-shared-reporting-impl
Requires: sac

%description
A CSS parser which implements SAC (the Simple API for CSS).

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}
Requires:       jpackage-utils

%description javadoc
API documentation for %{name}.

%prep
%setup -q -n %{name}

%patch0

%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mvn-jpp \
        -e \
        -Dmaven2.jpp.mode=true \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        install javadoc:javadoc

%install
rm -rf %{buildroot}

# jars
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}.jar

%add_to_maven_depmap net.sourceforge.cssparser cssparser %{version} JPP cssparser

# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
    %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom

# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
rm -rf target/site/api*

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%doc doc/license.html doc/readme.html

%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Dec 8 2010 Alexander Kurtakov <akurtako@redhat.com> 0.9.5-3
- Remove versioned javadoc.

* Wed Dec 8 2010 Alexander Kurtakov <akurtako@redhat.com> 0.9.5-2
- Adapt to current guidelines.

* Wed Mar 24 2010 Alexander Kurtakov <akurtako@redhat.com> 0.9.5-1
- Initial package.