wok view slitaz-hacker/receipt @ rev 199

All *-dev pkgs goes in category development
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 13 00:20:49 2008 +0100 (2008-02-13)
parents a9d21a554858
children faba01f76e76
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-hacker"
4 VERSION="1.0"
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/ash_history $fs/home/hacker/.ash_history
21 cp -a stuff/profile $fs/home/hacker/.profile
22 }
24 pre_install()
25 {
26 local root
27 root=$1
28 # Go for echoing on configuration files if any hacker was found.
29 #
30 if ! grep -q hacker $root/etc/passwd; then
31 echo -n "Configuring $root/etc..."
32 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd
33 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow
34 echo 'hacker:x:500:' >> $root/etc/group
35 echo 'hacker:!::' >> $root/etc/gshadow
36 status
37 else
38 echo "Hacker is already in : $root/etc/passwd"
39 fi
40 # Hacker can listen to music
41 #
42 if grep -q audio $root/etc/group; then
43 if ! grep -q "audio:x:20:hacker" $root/etc/group; then
44 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group
45 fi
46 fi
47 # Change permissions.
48 #
49 echo -n "Chmodig all files in /home/hacker..."
50 chown -R 500.500 $root/home/hacker
51 status
52 }