%global pkgname dirsrv # systemd support %global groupname %{pkgname}.target Summary: 389 Administration Server (admin) Name: 389-admin Version: 1.1.31 Release: %mkrel 2 License: GPLv2 and ASL 2.0 URL: http://port389.org/ Group: System/Servers BuildRequires: nspr-devel BuildRequires: nss-devel BuildRequires: openldap-devel BuildRequires: libsasl-devel BuildRequires: icu BuildRequires: libicu-devel BuildRequires: apache-devel BuildRequires: apr-devel BuildRequires: apache-mod_nss BuildRequires: 389-adminutil-devel Requires: 389-ds-base Requires: apache-mod_nss # this is needed for using semanage from our setup scripts Requires: policycoreutils-python # the following are needed for some of our scripts Requires: perl-Mozilla-LDAP Requires: nss # for systemd Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2 # 389-admin-git.sh should be used to generate the source tarball from git Source1: %{name}-git.sh Patch0: mageia-group.patch %description 389 Administration Server is an HTTP agent that provides management features for 389 Directory Server. It provides some management web apps that can be used through a web browser. It provides the authentication, access control, and CGI utilities used by the console. %prep %setup -q -n %{name}-%{version}%{?prerel} %patch0 -p1 -b .magaia-group %build autoreconf -fi %configure2_5x --disable-rpath \ --with-selinux \ --with-openldap \ --with-systemdsystemunitdir=%{_unitdir} \ --with-systemddirsrvgroupname=%{groupname} \ LDFLAGS=-L/usr/include/ # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS %ifarch x86_64 export USE_64=1 %endif %make %install make DESTDIR="%{buildroot}" install # make console jars directory mkdir -p %{buildroot}%{_datadir}/%{pkgname}/html/java #remove libtool and static libs rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/*.so rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/%{pkgname}/modules/*.a rm -f %{buildroot}%{_libdir}/%{pkgname}/modules/*.la %pre -p <lua> -- save ownership/permissions on the dirs/files that rpm changes -- if these don't exist, the vars will be nil %{pkgname}admin_adminserv = posix.stat('%{_sysconfdir}/%{pkgname}/admin-serv') %{pkgname}admin_consoleconf = posix.stat('%{_sysconfdir}/%{pkgname}/admin-serv/console.conf') %post -p <lua> -- do the usual daemon post setup stuff os.execute('/bin/systemctl preset %{pkgname}-admin.service >/dev/null 2>&1 || :') os.execute('/sbin/ldconfig') -- restore permissions if upgrading if %{pkgname}admin_adminserv then posix.chmod('%{_sysconfdir}/%{pkgname}/admin-serv', %{pkgname}admin_adminserv.mode) posix.chown('%{_sysconfdir}/%{pkgname}/admin-serv', %{pkgname}admin_adminserv.uid, %{pkgname}admin_adminserv.gid) end if %{pkgname}admin_consoleconf then posix.chmod('%{_sysconfdir}/%{pkgname}/admin-serv/console.conf', %{pkgname}admin_consoleconf.mode) posix.chown('%{_sysconfdir}/%{pkgname}/admin-serv/console.conf', %{pkgname}admin_consoleconf.uid, %{pkgname}admin_consoleconf.gid) end %preun %systemd_preun %{pkgname}-admin.service %files %doc LICENSE %dir %{_sysconfdir}/%{pkgname}/admin-serv %config(noreplace)%{_sysconfdir}/%{pkgname}/admin-serv/*.conf %{_datadir}/%{pkgname} %config(noreplace)%{_sysconfdir}/sysconfig/%{pkgname}-admin %{_unitdir}/%{pkgname}-admin.service %{_sbindir}/* %{_libdir}/*.so.* %{_libdir}/%{pkgname} %{_mandir}/man8/* %changelog * Mon Mar 04 2013 spuhler <spuhler> 1.1.31-2.mga3 + Revision: 401363 - added mageia-group.patch * Sat Mar 02 2013 spuhler <spuhler> 1.1.31-1.mga3 + Revision: 400964 - upgrade to version 1.1.31 to work with apache-2.4 * Fri Jan 11 2013 umeabot <umeabot> 1.1.30-5.mga3 + Revision: 345046 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Nov 09 2012 fwang <fwang> 1.1.30-4.mga3 + Revision: 316606 - rebuild for update icu * Tue Nov 06 2012 fwang <fwang> 1.1.30-3.mga3 + Revision: 314751 - rebuild for new icu * Mon Oct 29 2012 spuhler <spuhler> 1.1.30-2.mga3 + Revision: 311386 - Requires changed from nss-tools to nss We have most of the nss-tools files in nss bumped rel * Sun Oct 28 2012 spuhler <spuhler> 1.1.30-1.mga3 + Revision: 311087 - cleaned spec and corrected group - imported package 389-admin