%define name cpu %define version 1.4.3 %define release 5mdk %define lib_name_orig lib%{name} %define lib_major 0 %define libname %mklibname %name %lib_major %define libnamedev %mklibname %name %lib_major -d Summary: Ldap aware command like useradd, userdel, usermod and others Name: %{name} Version: %{version} Release: %{release} Source0: http://prdownloads.sourceforge.net/cpu/cpu-%version.tar.bz2 # first hunk taken from the debian unstable package, # author is Guido Trotter <ultrotter@debian.org> Patch: cpu-1.4.3-gcc4.patch.bz2 License: GPL Url: http://cpu.sourceforge.net Group: System/Base BuildRequires: openldap-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description CPU is an LDAP user management tool written in C and loosely based on FreeBSD's pw(8). The goal of CPU is to be a suitable replacement of the useradd/usermod/userdel utilities for administrators using an LDAP backend and wishing to have a suite of command line tools for doing the administration. %package -n %libname Summary: Ldap aware command like useradd, userdel, usermod and others Group: System/Base %description -n %libname CPU is an LDAP user management tool written in C and loosely based on FreeBSD's pw(8). The goal of CPU is to be a suitable replacement of the useradd/usermod/userdel utilities for administrators using an LDAP backend and wishing to have a suite of command line tools for doing the administration. %package -n %libnamedev Summary: Ldap aware command like useradd, userdel, usermod and others Group: System/Base Requires: %libname = %{version} Provides: lib%{name}-devel %{name}-devel %description -n %libnamedev CPU is an LDAP user management tool written in C and loosely based on FreeBSD's pw(8). The goal of CPU is to be a suitable replacement of the useradd/usermod/userdel utilities for administrators using an LDAP backend and wishing to have a suite of command line tools for doing the administration. %prep %setup -q %patch -p1 -b .gcc4 %build %configure %make %install rm -rf $RPM_BUILD_ROOT %makeinstall rm -f $RPM_BUILD_ROOT%{_datadir}/{cpu.conf.doc,test.ldif} %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc AUTHORS COPYING INSTALL NEWS README doc/cpu.conf.doc %{_mandir}/man8/* %{_mandir}/man5/* %{_sbindir}/cpu %config(noreplace) %{_sysconfdir}/cpu.conf %files -n %libname %defattr(-, root, root) %_libdir/*.so.* %files -n %libnamedev %defattr(-, root, root) %{_libdir}/*.so %_libdir/*.*a %changelog * Wed Sep 07 2005 Andreas Hasenack <andreas@mandriva.com> 1.4.3-5mdk - added patch to build with gcc4 (first hunk taken from the debian unstable package) - rebuilt with openldap-2.3.x * Tue Feb 08 2005 Buchan Milne <bgmilne@linux-mandrake.com> 1.4.3-4mdk - rebuild for ldap2.2_7 * Fri Feb 4 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.4.3-3mdk - rebuilt against new openldap libs * Wed Jan 14 2004 Franck Villaume <fvill@freesurf.fr> 1.4.3-2mdk - BuildRequires : openldap-devel * Mon Jan 12 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.4.3-1mdk - 1.4.3 * Fri Dec 12 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.4.2-1mdk - 1.4.2 - do not rm -rf $RPM_BUILD_ROOT in %%prep - no explicit library dependencies - add missing files to %%files - fix devel provides - fix devel requires * Thu Apr 03 2003 Lenny Cartier <lenny@mandrakesoft.com 1.3.99a-1mdk - 1.3.99a * Sat Feb 01 2003 Lenny Cartier <lenny@mandrakesoft.com 1.3.12-2mdk - rebuild * Thu Aug 22 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.3.12-1mdk - from Franck Martin <franck@sopac.org> : - first release for mdk8.2