wok-next view slitaz-base-files/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents eb23a9b0f828
children 35faee9ea669
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="328"
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 WEB_SITE="http://www.slitaz.org/"
10 HOST_ARCH="i486 arm"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2"
15 DEPENDS="gettext-base"
16 BUILD_DEPENDS="gettext"
18 CONFIG_FILES="
19 /etc/adduser.conf
20 /etc/passwd
21 /etc/fstab
22 /etc/issue
23 /etc/hosts
24 /etc/host.conf
25 /etc/hostname
26 /etc/group
27 /etc/gshadow
28 /etc/shadow
29 /etc/daemons.conf
30 /etc/nsswitch.conf
31 /etc/networks
32 /etc/profile
33 /etc/securetty
34 /etc/services
35 /etc/shells"
37 # Rules to configure and make the package.
38 compile_rules()
39 {
40 make DESTDIR=$DESTDIR install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p \
47 $fs/bin \
48 $fs/dev \
49 $fs/home \
50 $fs/media/cdrom \
51 $fs/media/flash \
52 $fs/media/usbdisk \
53 $fs/mnt \
54 $fs/proc \
55 $fs/root \
56 $fs/run \
57 $fs/sbin \
58 $fs/sys \
59 $fs/tmp \
60 $fs/usr/bin \
61 $fs/usr/games \
62 $fs/usr/lib \
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 \
72 $fs/var/run
74 # Daemons may store the pid files in /var/run
75 # from 5.0 /var/run is mounted as tmpfs
76 #ln -s /run $fs/var/run
78 # Copy all installed files and set permissions.
79 cp -a $install/* $fs
81 chown -R root.root $fs/*
82 chmod 1777 $fs/tmp
83 chmod 640 $fs/etc/shadow
84 chmod 640 $fs/etc/gshadow
85 chmod 0750 $fs/root
87 # Populate /dev with $fs/sbin/mktazdevs.sh.
88 $fs/sbin/mktazdevs.sh $fs/dev
90 # Create /etc/mtab symlink.
91 cd $fs/etc
92 ln -s /proc/mounts mtab
94 # Fix httphelper link
95 cd $fs/usr/lib/slitaz
96 ln -s httphelper.sh httphelper
98 # Update copyright year
99 grep -rl 'copy; 2' $fs/var/www | xargs \
100 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
101 }
103 # Pre and post install to backup all /etc/settings
104 #
105 pre_install()
106 {
107 cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null
108 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
109 # Remove old /var/run symlink
110 [ -h "$1/var/run" ] && rm -f "$1/var/run"
111 :
112 }
114 post_install()
115 {
116 if cp -a "$1/tmp/etc.bak"/* "$1/etc"; then
117 rm -r "$1/tmp/etc.bak"
118 fi 2>/dev/null
120 [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
122 # Reset permission.
123 chmod 640 "$1/etc/shadow"
124 chmod 640 "$1/etc/gshadow"
126 if ! grep -q audio "$1/etc/group"; then
127 chroot "$1/" /bin/addgroup -g 20 audio
128 fi
129 }
131 pre_remove()
132 {
133 # We can not remove this package!
134 exit 1
135 }