Blob Blame History Raw
%define major_version 1.1
%define minor_version 7

# only have localization for en right now
%global consolelang en

Name: 389-console
Version: %{major_version}.%{minor_version}
Release: 3%{?dist}
Summary: 389 Management Console

Group: Applications/System
License: LGPLv2
URL: http://port389.org

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source: http://port389.org/sources/%{name}-%{version}.tar.bz2
Requires: idm-console-framework
Requires: java >= 1:1.6.0
Requires: jpackage-utils
BuildRequires: ant
BuildRequires: ldapjdk
BuildRequires: jss
BuildRequires: idm-console-framework
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
Provides: fedora-idm-console = %{version}-%{release}
Obsoletes: fedora-idm-console < 1.1.3-2
%if 0%{?rhel} < 6                                                        
ExcludeArch: ppc                                                         
%endif    

%description
A Java based remote management console used for managing 389
Administration Server and 389 Directory Server.

%prep
%setup -q
                                                                                
%build
%{ant} \
    -Dbuilt.dir=`pwd`/built \
    buildnoscript

# add -Dlib.dir and -Dneed_libdir on those platforms where
# jss is installed in a non-standard location
# -Dneed_libdir=yes

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}
install -m644 built/*.jar $RPM_BUILD_ROOT%{_javadir}

# create symlinks
pushd $RPM_BUILD_ROOT%{_javadir}
ln -s %{name}-%{version}_%{consolelang}.jar %{name}-%{major_version}_%{consolelang}.jar
ln -s %{name}-%{version}_%{consolelang}.jar %{name}_%{consolelang}.jar
popd

install -d $RPM_BUILD_ROOT%{_sysconfdir}/java
cat > $RPM_BUILD_ROOT%{_sysconfdir}/java/%{name}.conf <<EOF
for file in %{_sysconfdir}/java/*-%{name}.conf ; do
    if [ -f "\$file" ] ; then
       . "\$file"
    fi
done
mylang=\${mylang:-%{consolelang}}
ADDITIONAL_JARS=\${ADDITIONAL_JARS:-%{name}_\$mylang.jar}
ADDITIONAL_OPTIONS=\${ADDITIONAL_OPTIONS:-"-Djava.util.prefs.systemRoot=\$HOME/.%{name} -Djava.util.prefs.userRoot=\$HOME/.%{name}"}
EOF
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/java/%{name}.conf

%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

# bug in jpackage_script macro on el5 - does not chmod 0755 the script
chmod 0755 $RPM_BUILD_ROOT%{_bindir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc LICENSE
%{_javadir}/%{name}-%{version}_%{consolelang}.jar
%{_javadir}/%{name}-%{major_version}_%{consolelang}.jar
%{_javadir}/%{name}_%{consolelang}.jar
%{_bindir}/%{name}
%{_sysconfdir}/java/%{name}.conf

%changelog
* Fri Oct  7 2011 Rich Megginson <rmeggins@redhat.com> - 1.1.7-3
- had to move some stuff around to make jpackage_script happy - it's magic

* Fri Oct  7 2011 Rich Megginson <rmeggins@redhat.com> - 1.1.7-2
- script was not being created as executable

* Tue Jun 14 2011 Rich Megginson <rmeggins@redhat.com> - 1.1.7-1
- use jpackage_script instead of packaging our own shell script
- support "skins" package for other brands/versions

* Thu Apr 15 2010 Rich Megginson <rmeggins@redhat.com> - 1.1.4-1
- 1.1.4 release

* Fri Nov 06 2009 Michael Stahnke <stahnma@fedoraproject.org> - 1.1.3-6
- ExcludeArch ppc due to no openjdk, thus no idm-console-framework  

* Wed Sep 30 2009 Rich Megginson <rmeggins@redhat.com> 1.1.3-5
- bug 521523 - add the "which" package to the Requires

* Wed Aug 12 2009 Rich Megginson <rmeggins@redhat.com> - 1.1.3-4
- final rebuild for 1.1.3 release

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed May 13 2009 Rich Megginson <rmeggins@redhat.com> 1.1.3-2
- rename to 389

* Tue Mar 31 2009 Rich Megginson <rmeggins@redhat.com> 1.1.3-1
- the 1.1.3 release

* Tue Apr 15 2008 Rich Megginson <rmeggins@redhat.com> 1.1.1-2
- use java > 1.5.0 for requirements

* Thu Jan 10 2008 Rich Megginson <rmeggins@redhat.com> 1.1.1-1
- this is the fedora package review candidate
- added LICENSE file
- changed permissions on jar files and shell script

* Wed Dec 19 2007 Rich Megginson <rmeggins@redhat.com> 1.1.0-5
- for the Fedora DS 1.1 release

* Thu Oct 25 2007 Nathan Kinder <nkinder@redhat.com> 1.1.0-4
- Removed noarch to ensure we find the 64-bit library.

* Wed Aug  1 2007 Nathan Kinder <nkinder@redhat.com> 1.1.0-3
- Separated theme package.

* Fri Jul 27 2007 Nathan Kinder <nkinder@redhat.com> 1.1.0-2
- Modified package name to be less generic.

* Mon Jul 26 2007 Nathan Kinder <nkinder@redhat.com> 1.1.0-1
- Initial creation