]>
Commit | Line | Data |
---|---|---|
6195839e | 1 | # TODO: |
2 | # - pldize examples | |
d44d83a7 | 3 | %include /usr/lib/rpm/macros.java |
4 | Summary: Ant task for yuicompressor | |
5 | Summary(pl.UTF-8): Wtyczka programu ant do yuicompressor | |
6 | Name: ant-yuicompressor | |
7 | Version: 0.5 | |
8 | Release: 1 | |
9 | License: BSD | |
10 | Group: Development/Languages/Java | |
11 | Source0: http://github.com/n0ha/yui-compressor-ant-task/tarball/yui-compressor-ant-task-0.5/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 895d08ada70ec00d48b9b008a1054a8f | |
b9526121 | 13 | Source1: antlib.xml |
d44d83a7 | 14 | URL: http://github.com/n0ha/yui-compressor-ant-task/ |
15 | BuildRequires: ant | |
16 | BuildRequires: jdk | |
17 | BuildRequires: jpackage-utils | |
18 | BuildRequires: rpm-javaprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.555 | |
68a63e3f | 20 | BuildRequires: sed >= 4.0 |
d44d83a7 | 21 | Requires: jpackage-utils |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Ant task for yuicompressor. | |
27 | ||
28 | %description -l pl.UTF-8 | |
29 | Wtyczka programu ant do yuicompressor. | |
30 | ||
31 | %package javadoc | |
32 | Summary: Online manual for %{name} | |
33 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
34 | Group: Documentation | |
35 | Requires: jpackage-utils | |
36 | ||
37 | %description javadoc | |
38 | Documentation for %{name}. | |
39 | ||
40 | %description javadoc -l pl.UTF-8 | |
41 | Dokumentacja do %{name}. | |
42 | ||
43 | %description javadoc -l fr.UTF-8 | |
44 | Javadoc pour %{name}. | |
45 | ||
46 | %package examples | |
47 | Summary: Examples for %{name} | |
48 | Summary(pl.UTF-8): Przykłady użycia %{name} | |
49 | Group: Documentation | |
50 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
51 | ||
52 | %description examples | |
53 | Examples for %{name}. | |
54 | ||
55 | %description examples -l pl.UTF-8 | |
56 | Przykłady dla pakietu %{name}. | |
57 | ||
58 | %package source | |
59 | Summary: Source code of %{name} | |
60 | Summary(pl.UTF-8): Kod źródłowy %{name} | |
61 | Group: Documentation | |
62 | Requires: jpackage-utils >= 1.7.5-2 | |
63 | ||
64 | %description source | |
65 | Source code of %{name}. | |
66 | ||
67 | %description source -l pl.UTF-8 | |
68 | Kod źródłowy %{name}. | |
69 | ||
70 | %prep | |
71 | %setup -qc | |
72 | mv n0ha-*/* . | |
82675d34 | 73 | %undos build.xml doc/example/build.xml |
d44d83a7 | 74 | |
75 | echo "ant/ant-yuicompressor yuicompressor" > ant.conf | |
76 | echo >> doc/CHANGELOG | |
77 | echo >> doc/LICENSE | |
78 | ||
79 | find -name '*jar' | xargs rm | |
80 | ||
81 | %build | |
82 | export JAVA_HOME="%{java_home}" | |
83 | ||
84 | required_jars="yuicompressor" | |
85 | CLASSPATH=$(build-classpath $required_jars) | |
86 | ||
87 | %ant jar javadocs \ | |
88 | -Dbuild.sysclasspath=first | |
89 | ||
b9526121 | 90 | install -d net/noha/tools/ant/yuicompressor/tasks/ |
91 | cp -a %{SOURCE1} net/noha/tools/ant/yuicompressor/tasks/antlib.xml | |
92 | %{jar} uf build/bin/yui-compressor-ant-task-%{version}.jar net/noha/tools/ant/yuicompressor/tasks/antlib.xml | |
93 | ||
d44d83a7 | 94 | %{jar} cf %{name}.src.jar -C src . |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | # ant task | |
100 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/ant.d,%{_javadir}/ant} | |
b9526121 | 101 | cp -a build/bin/yui-compressor-ant-task-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}-%{version}.jar |
d44d83a7 | 102 | ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}.jar |
103 | cp -a ant.conf $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/yuicompressor | |
104 | ||
105 | # javadoc | |
106 | install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} | |
107 | cp -a build/doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} | |
108 | ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink | |
109 | ||
110 | # examples | |
111 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
112 | cp -a doc/example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
113 | ||
114 | # source | |
115 | install -d $RPM_BUILD_ROOT%{_javasrcdir} | |
116 | cp -a %{name}.src.jar $RPM_BUILD_ROOT%{_javasrcdir}/%{name}.src.jar | |
117 | ||
118 | %clean | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %post javadoc | |
122 | ln -nfs %{name}-%{version} %{_javadocdir}/%{name} | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
126 | %doc README doc/CHANGELOG doc/LICENSE | |
127 | %{_sysconfdir}/ant.d/yuicompressor | |
128 | %{_javadir}/ant/%{name}.jar | |
129 | %{_javadir}/ant/%{name}-%{version}.jar | |
130 | ||
131 | %files examples | |
132 | %defattr(644,root,root,755) | |
133 | %{_examplesdir}/%{name}-%{version} | |
134 | ||
135 | %files javadoc | |
136 | %defattr(644,root,root,755) | |
137 | %{_javadocdir}/%{name}-%{version} | |
138 | %ghost %{_javadocdir}/%{name} | |
139 | ||
140 | %files source | |
141 | %defattr(644,root,root,755) | |
142 | %{_javasrcdir}/%{name}.src.jar |