1 |
%define major_version 1.1 |
2 |
%define minor_version 9 |
3 |
|
4 |
# only have localization for en right now |
5 |
%global consolelang en |
6 |
|
7 |
Name: 389-console |
8 |
Version: %{major_version}.%{minor_version} |
9 |
Release: %mkrel 5 |
10 |
Group: System/Servers |
11 |
Summary: 389 Management Console |
12 |
|
13 |
License: LGPLv2 |
14 |
URL: http://port389.org |
15 |
|
16 |
BuildArch: noarch |
17 |
Source: http://port389.org/sources/%{name}-%{version}.tar.bz2 |
18 |
Requires: idm-console-framework |
19 |
Requires: java >= 1:1.6.0 |
20 |
Requires: jpackage-utils |
21 |
BuildRequires: ant |
22 |
BuildRequires: ldapjdk |
23 |
BuildRequires: jss |
24 |
BuildRequires: idm-console-framework |
25 |
BuildRequires: java-devel >= 1:1.6.0 |
26 |
BuildRequires: jpackage-utils |
27 |
|
28 |
%description |
29 |
A Java based remote management console used for managing 389 |
30 |
Administration Server and 389 Directory Server. |
31 |
|
32 |
%prep |
33 |
%setup -q |
34 |
|
35 |
%build |
36 |
%{ant} \ |
37 |
-Dbuilt.dir=`pwd`/built -Dman.dir=`pwd`/built%{_mandir} \ |
38 |
buildnoscript |
39 |
|
40 |
|
41 |
# add -Dlib.dir and -Dneed_libdir on those platforms where |
42 |
# jss is installed in a non-standard location |
43 |
# -Dneed_libdir=yes |
44 |
|
45 |
%install |
46 |
install -d $RPM_BUILD_ROOT%{_javadir} |
47 |
install -m644 built/*.jar $RPM_BUILD_ROOT%{_javadir} |
48 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/java |
49 |
cat > $RPM_BUILD_ROOT%{_sysconfdir}/java/%{name}.conf <<EOF |
50 |
for file in %{_sysconfdir}/java/*-%{name}.conf ; do |
51 |
if [ -f "\$file" ] ; then |
52 |
. "\$file" |
53 |
fi |
54 |
done |
55 |
mylang=\${mylang:-%{consolelang}} |
56 |
ADDITIONAL_JARS=\${ADDITIONAL_JARS:-%{name}_\$mylang.jar} |
57 |
ADDITIONAL_OPTIONS=\${ADDITIONAL_OPTIONS:-"-Djava.util.prefs.systemRoot=\$HOME/.%{name} -Djava.util.prefs.userRoot=\$HOME/.%{name}"} |
58 |
EOF |
59 |
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/java/%{name}.conf |
60 |
%jpackage_script com.netscape.management.client.console.Console "" "" jss4.jar:ldapjdk.jar:idm-console-base.jar:idm-console-mcc.jar:idm-console-mcc_%{consolelang}.jar:idm-console-nmclf.jar:idm-console-nmclf_%{consolelang}.jar %{name} true |
61 |
|
62 |
install -d $RPM_BUILD_ROOT%{_mandir}/man8 |
63 |
install -m644 built%{_mandir}/man8/* $RPM_BUILD_ROOT%{_mandir}/man8 |
64 |
|
65 |
%files |
66 |
%doc LICENSE |
67 |
%{_javadir}/%{name}_%{consolelang}.jar |
68 |
%{_bindir}/%{name} |
69 |
%{_sysconfdir}/java/%{name}.conf |
70 |
%{_mandir}/man8/* |
71 |
|