2 #- Below variables are editable.
3 #- VERSION Script tries to set the version automatically if it's empty
4 #- string. The version number is assumed to be in
5 #- ../../source/include/version.h. Should this fail to find correct
6 #- version, set it manually to override automatic search.
7 #- BIN List of binaries from ../../source/bin. Note: do not include
8 #- swat here for it is a part of Samba.swat fileset
9 #- SCRIPT List of scripts
10 #- OS_REVISION The regular expression to determine the supported OS version.
11 #- The default versions are HP-UX 10.10 or later as well as 11.*.
12 #- You can modify this to reflect the OS you compile on. For
13 #- instance, to support any 10.? and 11.? releases, use the
18 BIN
="smbd nmbd smbclient testparm testprns smbstatus\
19 rpcclient smbpasswd make_smbcodepage nmblookup "
21 # SCRIPT="smbtar addtosmbpass convert_smbpasswd"
23 OS_RELEASE
='?.10.[2-9]?|?.11.*'
26 #- Below variables should be exported from create_package.sh
43 #--------------------------------------------------------------------------
47 echo "Deducing Samba version from version.h ... \c"
48 VERSION
=`grep VERSION ../../source/include/version.h | awk '{print $3}' |\
50 if [ $?
-ne 0 -o -z "$VERSION" ]
53 echo "Cannot find Samba version. Edit gen_psf.sh and set VERSION"
54 echo "variable manually."
61 echo "Creating list of codepage definitions ..."
63 #- create codepages from definition and add them to PSF file
64 for a
in ..
/..
/source
/codepages
/codepage_def.
[0-9][0-9][0-9]
66 b
=${a##../../source/codepages/codepage_def.}
67 CODEPAGES
="$CODEPAGES $b"
71 echo "Running make_smbcodepage on codepage definitions ... \c"
73 mkdir codepage
>/dev
/null
2>&1
76 ..
/..
/source
/bin
/make_smbcodepage c
$a ..
/..
/source
/codepages
/codepage_def.
$a\
81 #- HP-UX uses slightly different section numbers for man pages. The following
82 #- compares to "normal" sections:
84 #- Section HP-UX section
88 #- 8 1m administration commands
90 #- Sed expressions used in below loops replaces original section references
91 #- inside man page with HP-UX section references. Assumption is that
92 #- only numbers in brackets are section references and nothing else.
93 #- So far I did not see the man pages corrupted by replacing anything
94 #- else but section references.
96 mkdir man
>/dev
/null
2>&1
97 echo "Coverting man pages to HP-UX numbering ..."
98 echo "\t Sections 1 \c"
99 for a
in ..
/..
/docs
/manpages
/*.1
101 sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1/'\
109 $a >man
/`basename $a`
112 for a
in ..
/..
/docs
/manpages
/*.8
116 sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1M/'\
127 for a
in ..
/..
/docs
/manpages
/*.5
131 sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 4/'\
142 for a
in ..
/..
/docs
/manpages
/*.7
146 sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 5/'\
157 echo "Creating product specification file:"
158 echo "\tVendor and product description"
159 #- vendor and header of product definition
164 description <vendor_description
170 description < ../../WHATSNEW.txt
171 copyright "Copyright (c) 1998 Samba Team. See COPYING for details."
172 readme < ../../README
176 os_release $OS_RELEASE
184 echo "\tFileset $PRODUCT.core"
189 title Samba server core components
194 configure configure.bin
195 unconfigure unconfigure.bin
197 file -m 0755 -o root -g sys / /usr/local/samba/
198 file -m 0755 -o root -g sys / /usr/local/samba/bin/
199 file -m 0755 -o root -g sys / /usr/local/samba/lib/
200 file -m 0755 -o root -g sys / /usr/local/samba/lib/codepages/
201 file -m 0755 -o root -g sys / /usr/local/samba/newconfig/
202 file -m 0755 -o root -g sys / /usr/local/samba/newconfig/examples/
203 file -m 0700 -o root -g sys / /usr/local/samba/private/
204 file -m 0755 -o root -g sys / /var/usr/local/samba/
205 file -m 0755 -o root -g sys / /var/usr/local/samba/locks/
207 file -m 0444 -o root -g sys ../../COPYING /usr/local/samba/COPYING
208 file -m 0555 -o root -g sys ./samba.boot /sbin/init.d/samba
209 file -m 0444 -o root -g sys ./samba.config /usr/local/samba/newconfig/samba.config
211 file -m 0444 -o root -g sys ../../examples/smb.conf.default /usr/local/samba/newconfig/examples/smb.conf.default
212 file -m 0444 -o root -g sys ../../examples/simple/smb.conf /usr/local/samba/newconfig/examples/smb.conf.simple
213 file -m 0444 -o root -g sys ../../examples/dce-dfs/smb.conf /usr/local/samba/newconfig/examples/smb.conf.dce-dfs
215 directory ../../source/bin=/usr/local/samba/bin
219 echo " file -m 0555 -o root -g sys $a" >>$PSF
222 echo " directory ../../source/script=/usr/local/samba/bin" >>$PSF
226 echo " file -m 0555 -o root -g sys $a" >>$PSF
229 echo " directory ./codepage=/usr/local/samba/lib/codepages" >> $PSF
233 echo " file -m 0444 -o root -g sys codepage.$a" >>$PSF
236 #- end of fileset CORE
238 echo "\tFileset $PRODUCT.man"
243 title Samba server man pages
248 configure configure.man
250 file -m 0755 -o root -g sys / /usr/local/samba/man/
251 file -m 0755 -o root -g sys / /usr/local/samba/man/man1/
252 file -m 0755 -o root -g sys / /usr/local/samba/man/man1m/
253 file -m 0755 -o root -g sys / /usr/local/samba/man/man4/
254 file -m 0755 -o root -g sys / /usr/local/samba/man/man5/
258 #- HP-UX uses slightly different section numbers for man pages. The following
259 #- compares to "normal" sections:
261 #- Section HP-UX section
265 #- 8 1m administration commands
270 echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1/$b" >>$PSF
276 echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1m/$b" >>$PSF
282 echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man4/$b" >>$PSF
288 echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man5/$b" >>$PSF
293 echo "\tFileset $PRODUCT.swat"
299 title Samba Web-based administration tool
304 prerequisite Samba.core
305 configure configure.swat
306 unconfigure unconfigure.swat
308 file -m 0755 -o root -g sys / /usr/local/samba/swat/
309 file -m 0755 -o root -g sys / /usr/local/samba/swat/help/
310 file -m 0755 -o root -g sys / /usr/local/samba/swat/images/
311 file -m 0755 -o root -g sys / /usr/local/samba/swat/include/
313 directory ../../swat=/usr/local/samba/swat
314 file -m 0444 -o root -g sys README
316 directory ../../source/bin=/usr/local/samba/bin
317 file -m 0555 -o root -g sys swat
319 directory ../../swat/images=/usr/local/samba/swat/images
322 for a
in ..
/..
/swat
/images
/*.gif
325 echo " file -m 0444 -o root -g sys $b" >>$PSF
328 echo " directory ../../swat/help=/usr/local/samba/swat/help" >>$PSF
330 for a
in ..
/..
/swat
/help
/*.html
333 echo " file -m 0444 -o root -g sys $b" >>$PSF
336 echo " directory ../../docs/htmldocs=/usr/local/samba/swat/help" >>$PSF
338 for a
in ..
/..
/docs
/htmldocs
/*.html
341 echo " file -m 0444 -o root -g sys $b" >>$PSF
344 echo " directory ../../swat/include=/usr/local/samba/swat/include" >>$PSF
346 for a
in ..
/..
/swat
/include
/*.html
349 echo " file -m 0444 -o root -g sys $b" >>$PSF