wok view slitaz-hacker/receipt @ rev 286

ADD: libwrap, libwrap-dev
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Feb 27 16:38:56 2008 +0100 (2008-02-27)
parents f7cff624b2d2
children 6811d95394e6
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-hacker"
4 VERSION="1.1"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz user hacker."
7 MAINTAINER="pankso@slitaz.org"
8 WEB_SITE="http://www.slitaz.org/"
10 # Rules to gen a SliTaz package suitable for Tazpkg.
11 genpkg_rules()
12 {
13 # /home/hacker directories.
14 #
15 mkdir -p $fs/home/hacker/Documents \
16 $fs/home/hacker/Downloads \
17 $fs/home/hacker/Templates \
18 $fs/home/hacker/.local/bin \
19 $fs/home/hacker/.local/share
20 cp -a stuff/hacker $fs/home
21 # Change permissions.
22 #
23 echo -n "Chmodig all files in $fs/home/hacker..."
24 chown -R 500.500 $fs/home/hacker
25 status
26 }
28 pre_install()
29 {
30 local root
31 root=$1
32 # Go for echoing on configuration files if any hacker was found.
33 #
34 if ! grep -q hacker $root/etc/passwd; then
35 echo -n "Configuring $root/etc..."
36 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd
37 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow
38 echo 'hacker:x:500:' >> $root/etc/group
39 echo 'hacker:!::' >> $root/etc/gshadow
40 status
41 else
42 echo "Hacker is already in : $root/etc/passwd"
43 fi
44 # Hacker can listen to music
45 #
46 if grep -q audio $root/etc/group; then
47 if ! grep -q "audio:x:20:hacker" $root/etc/group; then
48 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group
49 fi
50 fi
51 }