wok-undigest rev 1137

Up: slitaz-base-files (5.6.5)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jan 07 11:41:23 2015 +0200 (2015-01-07)
parents 936c51ccd6ce
children 613d5c3f155f
files slitaz-base-files/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/slitaz-base-files/receipt	Wed Jan 07 11:41:23 2015 +0200
     1.3 @@ -0,0 +1,129 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="slitaz-base-files"
     1.7 +VERSION="5.6.5"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="Linux tree and the necessary files for the base system."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +LICENSE="BSD GPL3"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://www.slitaz.org/"
    1.14 +WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
    1.15 +HOST_ARCH="i486 arm"
    1.16 +
    1.17 +DEPENDS="gettext-base"
    1.18 +
    1.19 +CONFIG_FILES="
    1.20 +/etc/adduser.conf
    1.21 +/etc/passwd
    1.22 +/etc/fstab
    1.23 +/etc/issue
    1.24 +/etc/hosts
    1.25 +/etc/host.conf
    1.26 +/etc/hostname
    1.27 +/etc/group
    1.28 +/etc/gshadow
    1.29 +/etc/shadow
    1.30 +/etc/daemons.conf
    1.31 +/etc/nsswitch.conf
    1.32 +/etc/networks
    1.33 +/etc/profile
    1.34 +/etc/securetty
    1.35 +/etc/services
    1.36 +/etc/shells"
    1.37 +
    1.38 +# Rules to configure and make the package.
    1.39 +compile_rules()
    1.40 +{
    1.41 +	make DESTDIR=$DESTDIR install
    1.42 +}
    1.43 +
    1.44 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.45 +genpkg_rules()
    1.46 +{
    1.47 +	mkdir -p \
    1.48 +		$fs/bin \
    1.49 +		$fs/dev \
    1.50 +		$fs/home \
    1.51 +		$fs/media/cdrom \
    1.52 +		$fs/media/flash \
    1.53 +		$fs/media/usbdisk \
    1.54 +		$fs/mnt \
    1.55 +		$fs/proc \
    1.56 +		$fs/root \
    1.57 +		$fs/run \
    1.58 +		$fs/sbin \
    1.59 +		$fs/sys \
    1.60 +		$fs/tmp \
    1.61 +		$fs/usr/bin \
    1.62 +		$fs/usr/games \
    1.63 +		$fs/usr/lib \
    1.64 +		$fs/usr/local \
    1.65 +		$fs/usr/sbin \
    1.66 +		$fs/usr/share/doc \
    1.67 +		$fs/var/cache \
    1.68 +		$fs/var/games \
    1.69 +		$fs/var/lib \
    1.70 +		$fs/var/lock \
    1.71 +		$fs/var/log/slitaz \
    1.72 +		$fs/var/spool \
    1.73 +		$fs/var/tmp \
    1.74 +		$fs/var/run
    1.75 +
    1.76 +	# Daemons may store the pid files in /var/run
    1.77 +	# from 5.0 /var/run is mounted as tmpfs		
    1.78 +	#ln -s /run $fs/var/run
    1.79 +
    1.80 +	# Copy all installed files and set permissions.
    1.81 +	cp -a $install/* $fs
    1.82 +
    1.83 +	chown -R root.root $fs/*
    1.84 +	chmod 1777 $fs/tmp
    1.85 +	chmod 640 $fs/etc/shadow
    1.86 +	chmod 640 $fs/etc/gshadow
    1.87 +	chmod 0750 $fs/root
    1.88 +
    1.89 +	# Populate /dev with $fs/sbin/mktazdevs.sh.
    1.90 +	$fs/sbin/mktazdevs.sh $fs/dev
    1.91 +
    1.92 +	# Creat /etc/mtab symlink.
    1.93 +	cd $fs/etc
    1.94 +	ln -s /proc/mounts mtab
    1.95 +
    1.96 +	# Fix httphelper link
    1.97 +	cd $fs/usr/lib/slitaz
    1.98 +	ln -s httphelper.sh httphelper
    1.99 +}
   1.100 +
   1.101 +# Pre and post install to backup all /etc/settings
   1.102 +#
   1.103 +pre_install()
   1.104 +{
   1.105 +	local root
   1.106 +	root=$1
   1.107 +	cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
   1.108 +	# Remove old /var/run symlink
   1.109 +	rm -f $root/var/run
   1.110 +}
   1.111 +
   1.112 +post_install()
   1.113 +{
   1.114 +	local root
   1.115 +	root=$1
   1.116 +	cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
   1.117 +	rm -rf $root/tmp/etc.bak
   1.118 +
   1.119 +	# Reset permission.
   1.120 +	chmod 640 $root/etc/shadow
   1.121 +	chmod 640 $root/etc/gshadow
   1.122 +
   1.123 +	if ! grep -q audio $root/etc/group; then
   1.124 +		chroot $root/ /bin/addgroup -g 20 audio
   1.125 +	fi
   1.126 +}
   1.127 +
   1.128 +pre_remove()
   1.129 +{
   1.130 +	# We can not remove this package !
   1.131 +	exit 1
   1.132 +}