1 | # $Source: /opt/cvs/samba/smbldap-tools/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 |
|
---|
9 | Summary: User & Group administration tools for Samba/LDAP
|
---|
10 | Name: %{name}
|
---|
11 | version: %{version}
|
---|
12 | Release: %{release}
|
---|
13 | Group: System Environment/Base
|
---|
14 | License: GPL
|
---|
15 | Vendor: IDEALX
|
---|
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
|
---|
22 | Prefix: %{_prefix}
|
---|
23 | BuildArch: noarch
|
---|
24 |
|
---|
25 | %description
|
---|
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
|
---|
32 |
|
---|
33 | These scripts are developed and maintained by IDEALX for the Samba project.
|
---|
34 |
|
---|
35 | Scripts are described in the Smbldap-tools User Manual
|
---|
36 | (http://samba.idealx.org/smbldap-tools.en.html) which also give command
|
---|
37 | line examples.
|
---|
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).
|
---|
42 |
|
---|
43 | %prep
|
---|
44 | %setup -q
|
---|
45 |
|
---|
46 | %build
|
---|
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
|
---|
50 |
|
---|
51 |
|
---|
52 | %install
|
---|
53 | %{__rm} -rf %{buildroot}
|
---|
54 | #%makeinstall
|
---|
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/
|
---|
58 |
|
---|
59 | for i in smbldap-*
|
---|
60 | do
|
---|
61 | install $i $RPM_BUILD_ROOT/%prefix/sbin/$i
|
---|
62 | done
|
---|
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
|
---|
67 |
|
---|
68 |
|
---|
69 | %clean
|
---|
70 | if [ -n "$RPM_BUILD_ROOT" ] ; then
|
---|
71 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
---|
72 | fi
|
---|
73 |
|
---|
74 | %pre
|
---|
75 | files=`ls %{_prefix}/sbin/smbldap*.pl 2>/dev/null`
|
---|
76 | if [ "$files" != "" ];
|
---|
77 | then
|
---|
78 | echo "WARNING: new scripts do not have any .pl extension"
|
---|
79 | echo " You need to update the smb.conf file"
|
---|
80 | fi
|
---|
81 |
|
---|
82 | %post
|
---|
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 ];
|
---|
85 | then
|
---|
86 | rm -f /usr/lib/perl5/site_perl/smbldap_tools.pm
|
---|
87 | fi
|
---|
88 | if [ -f /usr/lib/perl5/site_perl/smbldap_conf.pm ];
|
---|
89 | then
|
---|
90 | rm -f /usr/lib/perl5/site_perl/smbldap_conf.pm
|
---|
91 | fi
|
---|
92 |
|
---|
93 | if [ ! -n `grep with_slappasswd %{_sysconfdir}/smbldap-tools/smbldap.conf | grep -v "^#"` ];
|
---|
94 | then
|
---|
95 | echo "Check if you have the with_slappasswd parameter defined"
|
---|
96 | echo "in smbldap.conf file (see the INSTALL file)"
|
---|
97 | fi
|
---|
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 |
|
---|