SPECS: higlayout.spec - add -demo and -javaodc - unify with templa...
glen
glen at pld-linux.org
Wed Nov 21 23:23:00 CET 2007
Author: glen Date: Wed Nov 21 22:23:00 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add -demo and -javaodc
- unify with template-java.spec
---- Files affected:
SPECS:
higlayout.spec (1.10 -> 1.11)
---- Diffs:
================================================================
Index: SPECS/higlayout.spec
diff -u SPECS/higlayout.spec:1.10 SPECS/higlayout.spec:1.11
--- SPECS/higlayout.spec:1.10 Wed Nov 21 15:42:18 2007
+++ SPECS/higlayout.spec Wed Nov 21 23:22:55 2007
@@ -1,6 +1,11 @@
# $Revision$, $Date$
# TODO:
-# - java docs doesn't build on builders, please fix this and include them again
+# - java docs doesn't build on builders
+#
+# Conditional build:
+%bcond_with javadoc # don't build javadoc
+#
+%include /usr/lib/rpm/macros.java
Summary: Easy to use and powerful layout manager for Java
Summary(pl.UTF-8): Łatwy w użyciu i potężny zarządca układów graficznych dla Javy
Name: higlayout
@@ -11,11 +16,12 @@
Source0: http://www.autel.cz/dmi/HIGLayout%{version}.zip
# Source0-md5: 5bd79f33157824499b0fc03d6a5e080a
URL: http://www.autel.cz/dmi/tutorial.html
-BuildRequires: java-sun
+BuildRequires: jdk
BuildRequires: sed >= 4.0
BuildRequires: unzip
Requires: jre >= 1.4
-ExclusiveArch: i586 i686 pentium3 pentium4 athlon %{x8664}
+BuildArch: noarch
+ExclusiveArch: i586 i686 pentium3 pentium4 athlon %{x8664} noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -24,36 +30,92 @@
%description -l pl.UTF-8
Łatwy w użyciu i potężny zarządca układów graficznych dla Javy.
+%package javadoc
+Summary: Java API documentation for higlayout
+Summary(pl.UTF-8): Dokumentacja Java API dla higlayout
+Group: Documentation
+
+%description javadoc
+Java API documentation for higlayout.
+
+%description javadoc -l pl.UTF-8
+Dokumentacja Java API dla higlayout.
+
+%package demo
+Summary: Demo for %{name}
+Summary(pl.UTF-8): Pliki demonstracyjne dla pakietu %{name}
+Group: Development
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description demo
+Demonstrations and samples for %{name}.
+
+%description demo -l pl.UTF-8
+Pliki demonstracyjne i przykłady dla pakietu %{name}.
+
%prep
%setup -q -c
mv src/cz .
sed -i -e 's/\r//g' examples/*.java tutorial/*.html *.txt
-rm -rf apidoc ; mkdir apidoc
+rm -rf apidoc; mkdir apidoc
%build
-javac -source 1.4 cz/autel/dmi/*.java
-jar cf %{name}.jar cz/autel/dmi/*.class
+%if %{with javadoc}
+%javadoc -link %{_javadocdir}/java -d apidoc cz.autel.dmi
+%endif
+%javac -source 1.4 cz/autel/dmi/*.java
+%jar cf %{name}.jar cz/autel/dmi/*.class
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_javadir}
-install -Dpm 644 %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+# install jar
+cp -a %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+# examples / tutorial
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples tutorial $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -a apidoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post javadoc
+ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
+
%files
%defattr(644,root,root,755)
-%doc Changes.txt LGPLicense.txt readme.txt examples/ tutorial/
+%doc Changes.txt LGPLicense.txt readme.txt
%{_javadir}/%{name}*.jar
+%files demo
+%defattr(644,root,root,755)
+%{_examplesdir}/%{name}-%{version}
+
+%if %{with javadoc}
+%files javadoc
+%defattr(644,root,root,755)
+%{_javadocdir}/%{name}-%{version}
+%endif
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.11 2007-11-21 22:22:55 glen
+- add -demo and -javaodc
+- unify with template-java.spec
+
Revision 1.10 2007-11-21 14:42:18 arvenil
- revert last commit
- -javadoc subpackage removed, doesn't build on builders
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/higlayout.spec?r1=1.10&r2=1.11&f=u
More information about the pld-cvs-commit
mailing list