JHT ===> Still mucking around with RPM building for RedHat Linux
[kai/samba.git] / examples / redhat / samba-1.9.16p11.spec
1 Summary: SMB client and server
2 Name: samba
3 Version: 1.9.16p11
4 Release: 3
5 Copyright: GPL
6 Group: Networking
7 Source: ftp://samba.anu.edu.au/pub/samba/samba-1.9.16p11.tar.gz
8 Patch: samba-make.patch
9 Patch2: samba-axp.patch
10 Packager: John H Terpstra [Samba-Team] <jht@aquasoft.com.au>
11 Requires: pamconfig
12
13 %description
14 Samba provides an SMB server which can be used to provide network
15 services to SMB (sometimes called "Lan Manager") clients, including
16 various versions of MS Windows, OS/2, and other Linux machines.
17 Samba also provides some SMB clients, which complement the built-in
18 SMB filesystem in Linux.
19
20 Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need
21 NetBEUI (Microsoft Raw NetBIOS frame) protocol.
22
23 %prep
24 %setup
25 %patch -p1
26
27 %ifarch axp
28 %patch2 -p1
29 %endif
30
31 %build
32 cd source
33 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
34
35 %install
36 cd source
37 cd ..
38 for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
39 do
40         install -m755 -s -g 0 -o 0 source/$i /usr/bin
41 done
42 for i in addtosmbpass mksmbpasswd.sh smbtar 
43 do
44         install -m755 -g 0 -o 0 source/$i /usr/bin
45 done
46 for i in smbd nmbd
47 do
48         install -m755 -s -g 0 -o 0 source/$i /usr/sbin
49 done
50 for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
51 do
52         install -m644 -g 0 -o 0 docs/$i /usr/man/man1
53 done
54 install -m644 -g 0 -o 0 docs/smb.conf.5 /usr/man/man5
55 install -m644 -g 0 -o 0 docs/samba.7 /usr/man/man7
56 install -m644 -g 0 -o 0 docs/smbd.8 /usr/man/man8
57 install -m644 -g 0 -o 0 docs/nmbd.8 /usr/man/man8
58 install -m644 examples/simple/smb.conf /etc/smb.conf.sampl
59 install -m644 examples/redhat/smb.conf /etc/smb.conf
60 install -m755 examples/redhat/smb.init /etc/rc.d/init.d/smb
61 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
62 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
63 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
64 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc1.d/K35smb
65 mkdir -p /home/samba
66 mkdir -p /var/lock/samba
67 chown root.nobody /home/samba
68 chmod 775 /home/samba
69 install -m 644 -o 0 -g 0 examples/redhat/samba.log /etc/logrotate.d/samba
70
71 %post
72 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
73
74 if [ ! -f /var/log/samba ]; then
75         touch /var/log/samba
76         chmod 600 /var/log/samba
77 fi
78
79 %postun
80 if [ "$1" = 0 ] ; then
81   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
82 fi
83
84 %files
85 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
86 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
87 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
88 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
89 %doc examples
90 /usr/sbin/smbd
91 /usr/bin/addtosmbpass
92 /usr/bin/mksmbpasswd.sh
93 /usr/bin/smbclient
94 /usr/sbin/nmbd
95 /usr/bin/testparm
96 /usr/bin/testprns
97 /usr/bin/smbrun
98 /usr/bin/smbstatus
99 /usr/bin/nmblookup
100 /usr/bin/smbpasswd
101 /usr/bin/smbtar
102 %config /etc/smb.conf
103 %config /etc/smb.conf.sampl
104 %config /etc/rc.d/init.d/smb
105 %config /etc/rc.d/rc3.d/S91smb
106 %config /etc/rc.d/rc0.d/K35smb
107 %config /etc/rc.d/rc1.d/K35smb
108 %config /etc/rc.d/rc6.d/K35smb
109 %config /etc/logrotate.d/samba
110 /usr/man/man1/smbstatus.1
111 /usr/man/man1/smbclient.1
112 /usr/man/man1/smbrun.1
113 /usr/man/man1/smbtar.1
114 /usr/man/man1/testparm.1
115 /usr/man/man1/testprns.1
116 /usr/man/man5/smb.conf.5
117 /usr/man/man7/samba.7
118 /usr/man/man8/smbd.8
119 /usr/man/man8/nmbd.8
120 %dir /home/samba
121 %dir /var/lock/samba