1# $Source: /ramdisk/repositories/20_cvs_clean_up/2011-02-11_sj/src/router/samba/samba-3.0.25b/examples/LDAP/smbldap-tools-0.9.2/smbldap-tools.spec,v $ 2%define version 0.9.2 3%define release 1 4%define name smbldap-tools 5%define realname smbldap-tools 6%define _prefix /opt/IDEALX 7%define _sysconfdir /etc/opt/IDEALX 8 9Summary: User & Group administration tools for Samba/LDAP 10Name: %{name} 11version: %{version} 12Release: %{release} 13Group: System Environment/Base 14License: GPL 15Vendor: IDEALX 16URL: http://samba.idealx.org/ 17Packager: Jerome Tournier <jerome.tournier@idealx.com> 18Source0: smbldap-tools-%{version}.tgz 19BuildRoot: /%{_tmppath}/%{name} 20BuildRequires: perl >= 5.6 21Requires: perl >= 5.6, samba 22Prefix: %{_prefix} 23BuildArch: noarch 24 25%description 26Smbldap-tools is a set of perl scripts designed to manage user and group 27accounts stored in an LDAP directory. They can be used both by users and 28administrators of Linux systems: 29. administrators can perform users and groups management operations, in a 30 way similar to the standard useradd or groupmod commands 31. users can change their LDAP password from the command line 32 33These scripts are developed and maintained by IDEALX for the Samba project. 34 35Scripts are described in the Smbldap-tools User Manual 36(http://samba.idealx.org/smbldap-tools.en.html) which also give command 37line examples. 38You can download the latest version on IDEALX web site 39(http://samba.idealx.org/dist/). 40Comments and/or questions can be sent to the smbldap-tools mailing list 41(http://lists.idealx.org/lists/samba). 42 43%prep 44%setup -q 45 46%build 47sed -i "s,/etc/opt/IDEALX/smbldap-tools/,%{_sysconfdir}/smbldap-tools/,g" smbldap_tools.pm 48sed -i "s,/etc/opt/IDEALX/smbldap-tools/,%{_sysconfdir}/smbldap-tools/,g" configure.pl 49sed -i "s,/etc/opt/IDEALX/,%{_sysconfdir}/,g" smbldap.conf 50 51 52%install 53%{__rm} -rf %{buildroot} 54#%makeinstall 55#mkdir -p $RPM_BUILD_ROOT/{etc/smbldap-tools,opt/IDEALX/sbin} 56mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/smbldap-tools 57mkdir -p $RPM_BUILD_ROOT/%_prefix/sbin/ 58 59for i in smbldap-* 60do 61 install $i $RPM_BUILD_ROOT/%prefix/sbin/$i 62done 63install configure.pl $RPM_BUILD_ROOT/%prefix/sbin/configure.pl 64cp -a smbldap.conf smbldap_bind.conf $RPM_BUILD_ROOT/%{_sysconfdir}/smbldap-tools/ 65cp -a smbldap_tools.pm $RPM_BUILD_ROOT/%{prefix}/sbin 66rm $RPM_BUILD_ROOT/%{prefix}/sbin/smbldap-tools.spec 67 68 69%clean 70if [ -n "$RPM_BUILD_ROOT" ] ; then 71 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 72fi 73 74%pre 75files=`ls %{_prefix}/sbin/smbldap*.pl 2>/dev/null` 76if [ "$files" != "" ]; 77then 78 echo "WARNING: new scripts do not have any .pl extension" 79 echo " You need to update the smb.conf file" 80fi 81 82%post 83# from smbldap-tools-0.8-2, libraries are loaded with the FindBin perl package 84if [ -f /usr/lib/perl5/site_perl/smbldap_tools.pm ]; 85then 86 rm -f /usr/lib/perl5/site_perl/smbldap_tools.pm 87fi 88if [ -f /usr/lib/perl5/site_perl/smbldap_conf.pm ]; 89then 90 rm -f /usr/lib/perl5/site_perl/smbldap_conf.pm 91fi 92 93if [ ! -n `grep with_slappasswd %{_sysconfdir}/smbldap-tools/smbldap.conf | grep -v "^#"` ]; 94then 95 echo "Check if you have the with_slappasswd parameter defined" 96 echo "in smbldap.conf file (see the INSTALL file)" 97fi 98 99%files 100%defattr(-,root,root) 101%{prefix}/sbin/configure.pl 102%{prefix}/sbin/smbldap-groupadd 103%{prefix}/sbin/smbldap-groupdel 104%{prefix}/sbin/smbldap-groupmod 105%{prefix}/sbin/smbldap-groupshow 106%{prefix}/sbin/smbldap-passwd 107%{prefix}/sbin/smbldap-populate 108%{prefix}/sbin/smbldap-useradd 109%{prefix}/sbin/smbldap-userdel 110%{prefix}/sbin/smbldap-usermod 111%{prefix}/sbin/smbldap-userinfo 112%{prefix}/sbin/smbldap-usershow 113%{prefix}/sbin/smbldap_tools.pm 114%doc CONTRIBUTORS COPYING ChangeLog FILES INFRA README INSTALL TODO 115%doc smb.conf smbldap.conf smbldap_bind.conf 116%doc doc/smbldap-* 117%doc doc/html 118%defattr(644,root,root) 119%config(noreplace) %{_sysconfdir}/smbldap-tools/smbldap.conf 120%defattr(600,root,root) 121%config(noreplace) %{_sysconfdir}/smbldap-tools/smbldap_bind.conf 122 123%changelog 124* Fri Nov 28 2003 Jerome Tournier <jerome.tournier@idealx.com> 0.8.2-1 125- see Changelog file for updates in scripts 126 127