packages: java-sac/java-sac.spec - pldize, builds; rel 1

glen glen at pld-linux.org
Sat Oct 22 00:32:00 CEST 2011


Author: glen                         Date: Fri Oct 21 22:32:00 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- pldize, builds; rel 1

---- Files affected:
packages/java-sac:
   java-sac.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/java-sac/java-sac.spec
diff -u packages/java-sac/java-sac.spec:1.2 packages/java-sac/java-sac.spec:1.3
--- packages/java-sac/java-sac.spec:1.2	Fri Oct 21 20:53:25 2011
+++ packages/java-sac/java-sac.spec	Sat Oct 22 00:31:55 2011
@@ -1,17 +1,19 @@
 # $Revision$, $Date$
-%define	orgname	sac
+#
+# Conditional build:
+%bcond_without	javadoc		# don't build javadoc
+
+%define		srcname	sac
 Summary:	Java standard interface for CSS parser
-Name:		java-%{orgname}
+Name:		java-%{srcname}
 Version:	1.3
-Release:	0.1
+Release:	1
 License:	W3C
-Group:		Libraries
-Source0:	http://www.w3.org/2002/06/%{orgname}java-%{version}.zip
+Group:		Libraries/Java
+Source0:	http://www.w3.org/2002/06/%{srcname}java-%{version}.zip
 # Source0-md5:	91c083636dc1a926bcb5b0bd0bde9ea5
-Source1:	%{orgname}-build.xml
-Source2:	%{orgname}-MANIFEST.MF
-Source3:	http://mirrors.ibiblio.org/pub/mirrors/maven2/org/w3c/css/sac/1.3/%{orgname}-%{version}.pom
-# Source3-md5:	2bebc9f4103026c9091d4bc7516f0daf
+Source1:	build.xml
+Source2:	MANIFEST.MF
 URL:		http://www.w3.org/Style/CSS/SAC/
 BuildRequires:	ant
 BuildRequires:	jdk
@@ -20,28 +22,27 @@
 Requires:	java
 Requires:	jpackage-utils
 BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 SAC is a standard interface for CSS parsers, intended to work with
 CSS1, CSS2, CSS3 and other CSS derived languages.
 
 %package javadoc
-Summary:	Javadoc for %{name}
-Group:		Development/Languages/Java
+Summary:	Javadoc for SAC
+Group:		Documentation
 
 %description javadoc
-Javadoc for %{name}.
+Javadoc for SAC.
 
 %prep
-%setup -q -n %{orgname}-%{version}
-install -m 644 %{SOURCE1} build.xml
-find . -name "*.jar" -exec rm -f {} \;
+%setup -q -n %{srcname}-%{version}
+cp -p %{SOURCE1} build.xml
 
-%build
-%ant jar javadoc
+find -name "*.jar" | xargs rm -v
 
-%install
-rm -rf $RPM_BUILD_ROOT
+%build
+%ant jar %{?with_javadoc:javadoc}
 
 # inject OSGi manifests
 install -d META-INF
@@ -49,36 +50,39 @@
 touch META-INF/MANIFEST.MF
 zip -u build/lib/sac.jar META-INF/MANIFEST.MF
 
-install -d $RPM_BUILD_ROOT%{_javadir}
-cp -p ./build/lib/sac.jar $RPM_BUILD_ROOT%{_javadir}/sac.jar
-
-install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%install
+rm -rf $RPM_BUILD_ROOT
 
-#%%add_to_maven_depmap org.w3c.css sac %{version} JPP sac
+install -d $RPM_BUILD_ROOT%{_javadir}
+cp -p build/lib/sac.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
+ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
 
-# poms
-#install -d $RPM_BUILD_ROOT%{_mavenpomdir}
-#install -pm 644 %{SOURCE3} \
-#    $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
+%endif
 
-#%post
-#%%update_maven_depmap
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-#%postun
-#%%update_maven_depmap
+%post javadoc
+ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
 
 %files
 %defattr(644,root,root,755)
 %doc COPYRIGHT.html
-%{_javadir}/%{orgname}.jar
-#%{_mavenpomdir}/*
-#%{_mavendepmapfragdir}/*
+%{_javadir}/%{srcname}.jar
+%{_javadir}/%{srcname}-%{version}.jar
 
+%if %{with javadoc}
 %files javadoc
 %defattr(644,root,root,755)
 %doc COPYRIGHT.html
-%{_javadocdir}/%{name}
+%{_javadocdir}/%{srcname}-%{version}
+%ghost %{_javadocdir}/%{srcname}
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -86,12 +90,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2011/10/21 22:31:55  glen
+- pldize, builds; rel 1
+
 Revision 1.2  2011/10/21 18:53:25  arekm
 - finish rename
 
 Revision 1.1  2011/10/17 16:56:12  arekm
 - raw, initial
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/java-sac/java-sac.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list