1 # $Source: /opt/cvs/samba/smbldap-tools/smbldap-tools.spec,v $
4 %define name smbldap-tools
5 %define realname smbldap-tools
6 %define _prefix /opt/IDEALX
7 %define _sysconfdir /etc/opt/IDEALX
9 Summary: User & Group administration tools for Samba/LDAP
13 Group: System Environment/Base
16 URL: http://samba.idealx.org/
17 Packager: Jerome Tournier <jerome.tournier@idealx.com>
18 Source0: smbldap-tools-%{version}.tgz
19 BuildRoot: /%{_tmppath}/%{name}
20 BuildRequires: perl >= 5.6
21 Requires: perl >= 5.6, samba
26 Smbldap-tools is a set of perl scripts designed to manage user and group
27 accounts stored in an LDAP directory. They can be used both by users and
28 administrators 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
33 These scripts are developed and maintained by IDEALX for the Samba project.
35 Scripts are described in the Smbldap-tools User Manual
36 (http://samba.idealx.org/smbldap-tools.en.html) which also give command
38 You can download the latest version on IDEALX web site
39 (http://samba.idealx.org/dist/).
40 Comments and/or questions can be sent to the smbldap-tools mailing list
41 (http://lists.idealx.org/lists/samba).
47 sed -i "s,/etc/opt/IDEALX/smbldap-tools/,%{_sysconfdir}/smbldap-tools/,g" smbldap_tools.pm
48 sed -i "s,/etc/opt/IDEALX/smbldap-tools/,%{_sysconfdir}/smbldap-tools/,g" configure.pl
49 sed -i "s,/etc/opt/IDEALX/,%{_sysconfdir}/,g" smbldap.conf
53 %{__rm} -rf %{buildroot}
55 #mkdir -p $RPM_BUILD_ROOT/{etc/smbldap-tools,opt/IDEALX/sbin}
56 mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/smbldap-tools
57 mkdir -p $RPM_BUILD_ROOT/%_prefix/sbin/
61 install $i $RPM_BUILD_ROOT/%prefix/sbin/$i
63 install configure.pl $RPM_BUILD_ROOT/%prefix/sbin/configure.pl
64 cp -a smbldap.conf smbldap_bind.conf $RPM_BUILD_ROOT/%{_sysconfdir}/smbldap-tools/
65 cp -a smbldap_tools.pm $RPM_BUILD_ROOT/%{prefix}/sbin
66 rm $RPM_BUILD_ROOT/%{prefix}/sbin/smbldap-tools.spec
70 if [ -n "$RPM_BUILD_ROOT" ] ; then
71 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
75 files=`ls %{_prefix}/sbin/smbldap*.pl 2>/dev/null`
76 if [ "$files" != "" ];
78 echo "WARNING: new scripts do not have any .pl extension"
79 echo " You need to update the smb.conf file"
83 # from smbldap-tools-0.8-2, libraries are loaded with the FindBin perl package
84 if [ -f /usr/lib/perl5/site_perl/smbldap_tools.pm ];
86 rm -f /usr/lib/perl5/site_perl/smbldap_tools.pm
88 if [ -f /usr/lib/perl5/site_perl/smbldap_conf.pm ];
90 rm -f /usr/lib/perl5/site_perl/smbldap_conf.pm
93 if [ ! -n `grep with_slappasswd %{_sysconfdir}/smbldap-tools/smbldap.conf | grep -v "^#"` ];
95 echo "Check if you have the with_slappasswd parameter defined"
96 echo "in smbldap.conf file (see the INSTALL file)"
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
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
124 * Fri Nov 28 2003 Jerome Tournier <jerome.tournier@idealx.com> 0.8.2-1
125 - see Changelog file for updates in scripts