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

libopenraw, abiword: update deps; boost: pack unpacked libs
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 21 05:42:25 2018 +0300 (2018-08-21)
parents cd7906120828
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-base-files"
4 VERSION="337"
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 REPOLOGY="-"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2"
15 BUILD_DEPENDS="gettext"
17 compile_rules() {
18 make DESTDIR=$install install
20 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \
21 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \
22 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \
23 /var/spool /var/tmp /var/run
24 do
25 mkdir -p $install$i
26 done
28 # Create /etc/mtab symlink
29 ln -s /proc/mounts $install/etc/mtab
31 # Add httphelper link
32 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper
34 # Populate /dev with $fs/sbin/mktazdevs.sh.
35 # Not required with udev.
36 # $fs/sbin/mktazdevs.sh $fs/dev
38 # Update copyright year
39 grep -rl 'copy; 2' $install/var/www | xargs \
40 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
42 # Set release
43 echo 'next' > $install/etc/slitaz-release
44 # Set mirror1 as default mirror
45 sed -i 's|mirror\.slitaz\.org|mirror1.slitaz.org|' $install/etc/slitaz/slitaz.conf
47 # Set arch
48 sed -i "s|SLITAZ_ARCH=.*|SLITAZ_ARCH=\"$ARCH\"|" $install/etc/slitaz/slitaz.conf
50 chown -R root:root $install
51 chmod 1777 $install/tmp
52 chmod 640 $install/etc/shadow
53 chmod 640 $install/etc/gshadow
54 chmod 0750 $install/root
55 }
57 genpkg_rules() {
58 cp -a $install/* $fs
59 DEPENDS="gettext-base"
60 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \
61 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \
62 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \
63 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \
64 /etc/slitaz/slitaz.conf /etc/sysctl.conf"
65 }
67 # Pre and post install to backup all /etc settings
68 #
69 pre_install() {
70 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
71 # Remove old /var/run symlink
72 [ -h "$1/var/run" ] && rm -f "$1/var/run"
73 :
74 }
76 post_install() {
77 [ -x "$1/usr/bin/sudo.orig" ] &&
78 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
80 # Reset permission.
81 chmod 640 "$1/etc/shadow"
82 chmod 640 "$1/etc/gshadow"
84 if ! grep -q audio "$1/etc/group"; then
85 chroot "$1/" /bin/addgroup -g 20 audio
86 fi
87 }
89 # We can not remove this package!
90 pre_remove() {
91 exit 1
92 }