wok-next view slitaz-base-files/receipt @ rev 13580
slitaz-base-files: update WGET_URL
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 05 21:05:18 2012 +0100 (2012-11-05) |
parents | 260846b278b1 |
children | 9d69d607085e |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="5.3.1"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.slitaz.org/"
10 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
11 HOST_ARCH="i486 arm"
13 DEPENDS="gettext-base"
15 CONFIG_FILES="
16 /etc/adduser.conf
17 /etc/passwd
18 /etc/fstab
19 /etc/issue
20 /etc/hosts
21 /etc/host.conf
22 /etc/hostname
23 /etc/group
24 /etc/gshadow
25 /etc/shadow
26 /etc/daemons.conf
27 /etc/nsswitch.conf
28 /etc/networks
29 /etc/profile
30 /etc/securetty
31 /etc/services
32 /etc/shells"
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 cd $src
38 make DESTDIR=$DESTDIR install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p \
45 $fs/bin \
46 $fs/dev \
47 $fs/home \
48 $fs/media/cdrom \
49 $fs/media/flash \
50 $fs/media/usbdisk \
51 $fs/mnt \
52 $fs/proc \
53 $fs/root \
54 $fs/run \
55 $fs/sbin \
56 $fs/sys \
57 $fs/tmp \
58 $fs/usr/bin \
59 $fs/usr/games \
60 $fs/usr/lib \
61 $fs/usr/local \
62 $fs/usr/sbin \
63 $fs/usr/share/doc \
64 $fs/var/cache \
65 $fs/var/games \
66 $fs/var/lib \
67 $fs/var/lock \
68 $fs/var/log/slitaz \
69 $fs/var/run \
70 $fs/var/spool \
71 $fs/var/tmp
73 # Copy all installed files and set permissions.
74 cp -a $install/* $fs
76 chown -R root.root $fs/*
77 chmod 1777 $fs/tmp
78 chmod 640 $fs/etc/shadow
79 chmod 640 $fs/etc/gshadow
80 chmod 0750 $fs/root
82 # Populate /dev with $fs/sbin/mktazdevs.sh.
83 $fs/sbin/mktazdevs.sh $fs/dev
85 # Creat /etc/mtab symlink.
86 cd $fs/etc
87 ln -s /proc/mounts mtab
89 # Fix httphelper link
90 cd $fs/usr/lib/slitaz
91 ln -s httphelper.sh httphelper
92 }
94 # Pre and post install to backup all /etc/settings
95 #
96 pre_install()
97 {
98 local root
99 root=$1
100 echo "Creating backup of all files in /etc..."
101 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
102 }
104 post_install()
105 {
106 local root
107 root=$1
108 echo "Restoring files from /etc/etc.bak..."
109 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
110 rm -rf $root/tmp/etc.bak
112 # Reset permission.
113 chmod 640 $root/etc/shadow
114 chmod 640 $root/etc/gshadow
116 if ! grep -q audio $root/etc/group; then
117 chroot $root/ /bin/addgroup -g 20 audio
118 fi
119 }
121 pre_remove()
122 {
123 # We can not remove this package !
124 exit 1
125 }