wok view slitaz-base-files/receipt @ rev 16173

Add: ympd (web frontend for mpd - perfect for RPi audio center remote control from desktop or mobile
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 30 16:39:01 2014 +0200 (2014-03-30)
parents 95c2e3f416e2
children 37ab4393a6c7
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="5.4.2"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.slitaz.org/"
11 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
12 HOST_ARCH="i486 arm"
14 DEPENDS="gettext-base"
16 CONFIG_FILES="
17 /etc/adduser.conf
18 /etc/passwd
19 /etc/fstab
20 /etc/issue
21 /etc/hosts
22 /etc/host.conf
23 /etc/hostname
24 /etc/group
25 /etc/gshadow
26 /etc/shadow
27 /etc/daemons.conf
28 /etc/nsswitch.conf
29 /etc/networks
30 /etc/profile
31 /etc/securetty
32 /etc/services
33 /etc/shells"
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 cd $src
39 make DESTDIR=$DESTDIR install
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p \
46 $fs/bin \
47 $fs/dev \
48 $fs/home \
49 $fs/media/cdrom \
50 $fs/media/flash \
51 $fs/media/usbdisk \
52 $fs/mnt \
53 $fs/proc \
54 $fs/root \
55 $fs/run \
56 $fs/sbin \
57 $fs/sys \
58 $fs/tmp \
59 $fs/usr/bin \
60 $fs/usr/games \
61 $fs/usr/lib \
62 $fs/usr/local \
63 $fs/usr/sbin \
64 $fs/usr/share/doc \
65 $fs/var/cache \
66 $fs/var/games \
67 $fs/var/lib \
68 $fs/var/lock \
69 $fs/var/log/slitaz \
70 $fs/var/spool \
71 $fs/var/tmp
73 # Daemons may store the pid files in /var/run
74 ln -s /run $fs/var/run
76 # Copy all installed files and set permissions.
77 cp -a $install/* $fs
79 chown -R root.root $fs/*
80 chmod 1777 $fs/tmp
81 chmod 640 $fs/etc/shadow
82 chmod 640 $fs/etc/gshadow
83 chmod 0750 $fs/root
85 # Populate /dev with $fs/sbin/mktazdevs.sh.
86 $fs/sbin/mktazdevs.sh $fs/dev
88 # Creat /etc/mtab symlink.
89 cd $fs/etc
90 ln -s /proc/mounts mtab
92 # Fix httphelper link
93 cd $fs/usr/lib/slitaz
94 ln -s httphelper.sh httphelper
95 }
97 # Pre and post install to backup all /etc/settings
98 #
99 pre_install()
100 {
101 local root
102 root=$1
103 echo "Creating backup of all files in /etc..."
104 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
105 }
107 post_install()
108 {
109 local root
110 root=$1
111 echo "Restoring files from /etc/etc.bak..."
112 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
113 rm -rf $root/tmp/etc.bak
115 # Reset permission.
116 chmod 640 $root/etc/shadow
117 chmod 640 $root/etc/gshadow
119 if ! grep -q audio $root/etc/group; then
120 chroot $root/ /bin/addgroup -g 20 audio
121 fi
122 }
124 pre_remove()
125 {
126 # We can not remove this package !
127 exit 1
128 }