wok view slitaz-hacker/receipt @ rev 654

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