]> git.pld-linux.org Git - SPECS.git/blob - java-commons-io.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / java-commons-io.spec
1 #
2 # Conditional build:
3 %bcond_without  javadoc         # don't build javadoc
4 %bcond_with     tests           # run tests (takes long time)
5
6 %define         srcname commons-io
7 Summary:        Commons IO component for Java servlets
8 Summary(pl.UTF-8):      Komponent Commons IO dla serwletów Javy
9 Name:           java-commons-io
10 Version:        1.4
11 Release:        3
12 License:        Apache v2.0
13 Group:          Libraries/Java
14 Source0:        http://www.apache.org/dist/commons/io/source/commons-io-%{version}-src.tar.gz
15 # Source0-md5:  24b228f2d0c40ffed9204cdab015bccf
16 URL:            http://commons.apache.org/io/
17 BuildRequires:  ant
18 %{?with_tests:BuildRequires:    ant-junit >= 1.5}
19 BuildRequires:  jdk
20 BuildRequires:  jpackage-utils
21 %{?with_tests:BuildRequires:    junit >= 3.8.1}
22 BuildRequires:  rpm-javaprov
23 BuildRequires:  rpmbuild(macros) >= 1.300
24 Requires:       jpackage-utils
25 Obsoletes:      jakarta-commons-io
26 Obsoletes:      jakarta-commons-io-doc
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Commons IO is a library of utilities to assist with developing I/O
32 functionality.
33
34 %description -l pl.UTF-8
35 Commons IO to biblioteka narzędzi pomagających przy rozwijaniu
36 funkcjonalności I/O.
37
38 %package javadoc
39 Summary:        Online manual for Commons IO
40 Summary(pl.UTF-8):      Dokumentacja online do Commons IO
41 Group:          Documentation
42 Requires:       jpackage-utils
43 Obsoletes:      jakarta-commons-io-javadoc
44
45 %description javadoc
46 Documentation for Commons IO.
47
48 %description javadoc -l pl.UTF-8
49 Dokumentacja do Commons IO.
50
51 %description javadoc -l fr.UTF-8
52 Javadoc pour Commons IO.
53
54 %prep
55 %setup -q -n commons-io-%{version}-src
56
57 %build
58 # for tests
59 %ant jar %{?with_javadoc:javadoc}
60
61 %if %{with tests}
62 JUNITJAR=$(find-jar junit)
63 %ant -Djunit.jar=$JUNITJAR test
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_javadir}
69
70 cp -a target/commons-io-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
71 ln -sf commons-io-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-io.jar
72
73 # javadoc
74 %if %{with javadoc}
75 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
76 cp -a target/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
77 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
78 %endif
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post javadoc
84 ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
85
86 %files
87 %defattr(644,root,root,755)
88 %{_javadir}/*.jar
89
90 %if %{with javadoc}
91 %files javadoc
92 %defattr(644,root,root,755)
93 %{_javadocdir}/%{srcname}-%{version}
94 %ghost %{_javadocdir}/%{srcname}
95 %endif
This page took 0.126057 seconds and 3 git commands to generate.