]> git.pld-linux.org Git - packages/ant-yuicompressor.git/blobdiff - ant-yuicompressor.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/ant-yuicompressor.git] / ant-yuicompressor.spec
index 938c1c21a0c4ae56821f5060e23ee318a7f93c04..34fc5d1211b1d0b057c1cea56f1fa3ed40f897dc 100644 (file)
@@ -1,6 +1,5 @@
 # TODO:
 # - pldize examples
-%include       /usr/lib/rpm/macros.java
 Summary:       Ant task for yuicompressor
 Summary(pl.UTF-8):     Wtyczka programu ant do yuicompressor
 Name:          ant-yuicompressor
@@ -10,6 +9,7 @@ License:       BSD
 Group:         Development/Languages/Java
 Source0:       http://github.com/n0ha/yui-compressor-ant-task/tarball/yui-compressor-ant-task-0.5/%{name}-%{version}.tar.gz
 # Source0-md5: 895d08ada70ec00d48b9b008a1054a8f
+Source1:       antlib.xml
 URL:           http://github.com/n0ha/yui-compressor-ant-task/
 BuildRequires: ant
 BuildRequires: jdk
@@ -71,7 +71,17 @@ Kod źródłowy %{name}.
 mv n0ha-*/* .
 %undos build.xml doc/example/build.xml
 
-echo "ant/ant-yuicompressor yuicompressor" > ant.conf
+# name of second jar can not be substring of first jar. This part of code is
+# from /usr/bin/jar:
+#          for dep in `cat "$file"`; do
+#            case "$OPT_JAR_LIST" in
+#            *"$dep"*) ;;
+#            *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+#            esac
+#          done
+# so if second name is contained in first it will be skipped.
+echo "yuicompressor ant/ant-yuicompressor" > ant.conf
+
 echo >> doc/CHANGELOG
 echo >> doc/LICENSE
 
@@ -86,14 +96,18 @@ CLASSPATH=$(build-classpath $required_jars)
 %ant jar javadocs \
        -Dbuild.sysclasspath=first
 
-%{jar} cf %{name}.src.jar -C src .
+install -d net/noha/tools/ant/yuicompressor/tasks/
+cp -a %{SOURCE1} net/noha/tools/ant/yuicompressor/tasks/antlib.xml
+%jar uf build/bin/yui-compressor-ant-task-%{version}.jar net/noha/tools/ant/yuicompressor/tasks/antlib.xml
+
+%jar cf %{name}.src.jar -C src .
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 # ant task
 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ant.d,%{_javadir}/ant}
-cp -a build/bin/yui-compressor-ant-task-0.5.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}-%{version}.jar
+cp -a build/bin/yui-compressor-ant-task-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}-%{version}.jar
 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}.jar
 cp -a ant.conf $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/yuicompressor
 
This page took 0.065387 seconds and 4 git commands to generate.