packages: java-tigase-xmltools/java-tigase-xmltools.spec (NEW) - new spec
jajcus
jajcus at pld-linux.org
Mon May 9 10:50:07 CEST 2011
Author: jajcus Date: Mon May 9 08:50:07 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- new spec
---- Files affected:
packages/java-tigase-xmltools:
java-tigase-xmltools.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/java-tigase-xmltools/java-tigase-xmltools.spec
diff -u /dev/null packages/java-tigase-xmltools/java-tigase-xmltools.spec:1.1
--- /dev/null Mon May 9 10:50:07 2011
+++ packages/java-tigase-xmltools/java-tigase-xmltools.spec Mon May 9 10:50:02 2011
@@ -0,0 +1,129 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without javadoc # don't build javadoc
+%bcond_without source # don't build source jar
+
+%include /usr/lib/rpm/macros.java
+
+%define srcname tigase-xmltools
+%define build_id 484
+Summary: Tigase XML Tools - simple XML parser for XMPP proocol
+Name: java-tigase-xmltools
+Version: 3.3.1
+Release: 1
+License: GPL v3
+Group: Libraries/Java
+Source0: https://projects.tigase.org/attachments/download/19/%{srcname}-%{version}-b%{build_id}.src.tar.gz
+# Source0-md5: 9bc0f45afc4f0ff4473f69d50cd70240
+URL: https://projects.tigase.org/projects/tigase-xmltools/
+BuildRequires: jpackage-utils
+BuildRequires: rpm-javaprov
+BuildRequires: rpmbuild(macros) >= 1.555
+BuildRequires: sed >= 4.0
+Requires: jpackage-utils
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+tigase.xml - Simple XML parser for XMPP proocol.
+
+%package javadoc
+Summary: Online manual for %{srcname}
+Summary(pl.UTF-8): Dokumentacja online do %{srcname}
+Group: Documentation
+Requires: jpackage-utils
+
+%description javadoc
+Documentation for %{srcname}.
+
+%description javadoc -l pl.UTF-8
+Dokumentacja do %{srcname}.
+
+%description javadoc -l fr.UTF-8
+Javadoc pour %{srcname}.
+
+%package source
+Summary: Source code of %{srcname}
+Summary(pl.UTF-8): Kod źródłowy %{srcname}
+Group: Documentation
+Requires: jpackage-utils >= 1.7.5-2
+
+%description source
+Source code of %{srcname}.
+
+%description source -l pl.UTF-8
+Kod źródłowy %{srcname}.
+
+%prep
+%setup -q -n %{srcname}-%{version}-b%{build_id}.src
+
+%build
+export JAVA_HOME="%{java_home}"
+
+%ant prepare-dist jar-dist
+
+%if %{with javadoc}
+%ant docs
+%endif
+
+%if %{with source}
+cd src
+%jar cf ../%{srcname}.src.jar $(find -name '*.java')
+cd ..
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_javadir}
+
+# jars
+cp -a jars/%{srcname}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
+ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
+
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -a docs-%{srcname}/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
+%endif
+
+# source
+%if %{with source}
+install -d $RPM_BUILD_ROOT%{_javasrcdir}
+cp -a %{srcname}.src.jar $RPM_BUILD_ROOT%{_javasrcdir}/%{srcname}.src.jar
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post javadoc
+ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
+
+%files
+%defattr(644,root,root,755)
+%{_javadir}/%{srcname}.jar
+%{_javadir}/%{srcname}-%{version}.jar
+
+%if %{with javadoc}
+%files javadoc
+%defattr(644,root,root,755)
+%{_javadocdir}/%{srcname}-%{version}
+%ghost %{_javadocdir}/%{srcname}
+%endif
+
+%if %{with source}
+%files source
+%defattr(644,root,root,755)
+%{_javasrcdir}/%{srcname}.src.jar
+%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.1 2011/05/09 08:50:02 jajcus
+- new spec
+
================================================================
More information about the pld-cvs-commit
mailing list