packages: 389-admin/389-admin.spec - pldize
glen
glen at pld-linux.org
Tue Feb 23 09:38:39 CET 2010
Author: glen Date: Tue Feb 23 08:38:39 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- pldize
---- Files affected:
packages/389-admin:
389-admin.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: packages/389-admin/389-admin.spec
diff -u packages/389-admin/389-admin.spec:1.2 packages/389-admin/389-admin.spec:1.3
--- packages/389-admin/389-admin.spec:1.2 Tue Feb 23 05:51:45 2010
+++ packages/389-admin/389-admin.spec Tue Feb 23 09:38:34 2010
@@ -1,17 +1,21 @@
# $Revision$, $Date$
-%define prerel .a1
+# TODO
+# - merge with fedora-ds-admin.spec
#%global selinux_variants mls targeted
+%define subver .a1
+%define rel 0.1
Summary: 389 Administration Server (admin)
Name: 389-admin
Version: 1.1.11
-Release: 1%{prerel}
-License: GPLv2 and ASL 2.0
+Release: 0%{?subver}.%{rel}
+License: GPL v2 and ASL 2.0
Group: Daemons
URL: http://directory.fedoraproject.org/
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
+Source0: http://directory.fedoraproject.org/sources/%{name}-%{version}%{subver}.tar.bz2
+# Source0-md5: 2d5c5e2058429086bbced744590aba7f
+#Patch1: f11-httpd.patch
BuildRequires: 389-adminutil-devel
BuildRequires: apache-devel
BuildRequires: apr-devel
@@ -23,29 +27,22 @@
BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: svrcore-devel
-
-%if 0
+%if %{with selinux}
# The following are needed to build the SELinux policy
BuildRequires: /usr/share/selinux/devel/Makefile
BuildRequires: 389-ds-base-selinux-devel
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
%endif
-
Requires: 389-ds-base
Requires: apache-mod_nss
# the following are needed for some of our scripts
Requires: nss-tools
Requires: perl-Mozilla-LDAP
-
# for the init script
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
-
-Source0: http://directory.fedoraproject.org/sources/%{name}-%{version}%{prerel}.tar.bz2
-# Source0-md5: 2d5c5e2058429086bbced744590aba7f
-#Patch1: f11-httpd.patch
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
389 Administration Server is an HTTP agent that provides management
@@ -53,47 +50,44 @@
apps that can be used through a web browser. It provides the
authentication, access control, and CGI utilities used by the console.
-%if 0
-%package selinux
+%package selinux
Summary: SELinux policy for 389 Administration Server
Group: Daemons
Requires: %{name} = %{version}-%{release}
Requires: 389-ds-base-selinux
Requires: selinux-policy
-%description selinux
+%description selinux
SELinux policy for the 389 Adminstration Server package.
-%endif
-SELinux policy for the 389 Adminstration Server package.
%prep
-%setup -q -n %{name}-%{version}%{prerel}
+%setup -q -n %{name}-%{version}%{subver}
#%patch1
%build
%{__aclocal} -I m4
%{__automake}
%{__autoconf}
-%configure CFLAGS="%rpmcflags `apu-1-config --includes`" \
+export CFLAGS="%{rpmcflags} $(apu-1-config --includes)"
+%configure \
--disable-rpath \
- #--with-selinux
+ %{?with_selinux:--with-selinux}
%ifarch x86_64 ppc64 ia64 s390x sparc64
export USE_64=1
%endif
-%{make}
+%{__make}
-%if 0
+%if %{with selinux}
# Build the SELinux policy module for each variant
cd selinux-built
cp %{_datadir}/dirsrv-selinux/dirsrv.if .
cp %{_datadir}/dirsrv-selinux/dirsrv.te .
-for selinuxvariant in %{selinux_variants}
-do
-%{__make} NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
- mv dirsrv-admin.pp dirsrv-admin.pp.${selinuxvariant}
-%{__make} NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
+for selinuxvariant in %{selinux_variants}; do
+ %{__make} NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
+ mv dirsrv-admin.pp dirsrv-admin.pp.${selinuxvariant}
+ %{__make} NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
done
cd -
%endif
@@ -101,26 +95,26 @@
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} DESTDIR="$RPM_BUILD_ROOT" install
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
# make console jars directory
install -d $RPM_BUILD_ROOT%{_datadir}/dirsrv/html/java
-#remove libtool and static libs
+# remove libtool and static libs
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.so
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/dirsrv/modules/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/dirsrv/modules/*.la
-%if 0
+%if %{with selinux}
# Install the SELinux policy
cd selinux-built
-for selinuxvariant in %{selinux_variants}
-do
- install -d $RPM_BUILD_ROOT%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 dirsrv-admin.pp.${selinuxvariant} \
- $RPM_BUILD_ROOT%{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp
+for selinuxvariant in %{selinux_variants}; do
+ install -d $RPM_BUILD_ROOT%{_datadir}/selinux/${selinuxvariant}
+ install -p -m 644 dirsrv-admin.pp.${selinuxvariant} \
+ $RPM_BUILD_ROOT%{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp
done
cd -
%endif
@@ -133,40 +127,37 @@
/sbin/ldconfig
%preun
-if [ $1 = 0 ]; then
- %service dirsrv-admin stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del dirsrv-admin
+if [ "$1" = 0 ]; then
+ %service dirsrv-admin stop
+ /sbin/chkconfig --del dirsrv-admin
fi
%postun -p /sbin/ldconfig
-%if 0
+%if %{with selinux}
%post selinux
-if [ "$1" -le "1" ] ; then # First install
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp 2>/dev/null || :
-done
-fixfiles -R %{name} restore || :
-/sbin/service dirsrv-admin condrestart > /dev/null 2>&1 || :
+if [ "$1" -le "1" ]; then # First install
+ for selinuxvariant in %{selinux_variants}; do
+ semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp 2>/dev/null || :
+ done
+ fixfiles -R %{name} restore || :
+ %service dirsrv-admin condrestart
fi
%preun selinux
if [ "$1" -lt "1" ]; then # Final removal
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -r dirsrv-admin 2>/dev/null || :
-done
-fixfiles -R %{name} restore || :
-%service dirsrv-admin condrestart > /dev/null 2>&1 || :
+ for selinuxvariant in %{selinux_variants}; do
+ semodule -s ${selinuxvariant} -r dirsrv-admin 2>/dev/null || :
+ done
+ fixfiles -R %{name} restore || :
+ %service dirsrv-admin condrestart
fi
%postun selinux
if [ "$1" -ge "1" ]; then # Upgrade
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp 2>/dev/null || :
-done
+ for selinuxvariant in %{selinux_variants}; do
+ semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/dirsrv-admin.pp 2>/dev/null || :
+ done
fi
%endif
@@ -183,7 +174,7 @@
%{_libdir}/dirsrv
%{_mandir}/man8/*
-%if 0
+%if %{with selinux}
%files selinux
%defattr(644,root,root,755)
%{_datadir}/selinux/*/dirsrv-admin.pp
@@ -195,6 +186,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2010/02/23 08:38:34 glen
+- pldize
+
Revision 1.2 2010/02/23 04:51:45 aredridel
- adapterized
+Revision 1.1 2010/02/23 04:51:19 aredridel
+- added
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/389-admin/389-admin.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list