# HG changeset patch # User Aleksej Bobylev # Date 1420623683 -7200 # Node ID 4cfdbade6128aea1d97903b0cd2c07677b473f63 # Parent 936c51ccd6ce79cd13b8fb1bf28f0fa541aa98ce Up: slitaz-base-files (5.6.5) diff -r 936c51ccd6ce -r 4cfdbade6128 slitaz-base-files/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-base-files/receipt Wed Jan 07 11:41:23 2015 +0200 @@ -0,0 +1,129 @@ +# SliTaz package receipt. + +PACKAGE="slitaz-base-files" +VERSION="5.6.5" +CATEGORY="base-system" +SHORT_DESC="Linux tree and the necessary files for the base system." +MAINTAINER="pankso@slitaz.org" +LICENSE="BSD GPL3" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.slitaz.org/" +WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz" +HOST_ARCH="i486 arm" + +DEPENDS="gettext-base" + +CONFIG_FILES=" +/etc/adduser.conf +/etc/passwd +/etc/fstab +/etc/issue +/etc/hosts +/etc/host.conf +/etc/hostname +/etc/group +/etc/gshadow +/etc/shadow +/etc/daemons.conf +/etc/nsswitch.conf +/etc/networks +/etc/profile +/etc/securetty +/etc/services +/etc/shells" + +# Rules to configure and make the package. +compile_rules() +{ + make DESTDIR=$DESTDIR install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p \ + $fs/bin \ + $fs/dev \ + $fs/home \ + $fs/media/cdrom \ + $fs/media/flash \ + $fs/media/usbdisk \ + $fs/mnt \ + $fs/proc \ + $fs/root \ + $fs/run \ + $fs/sbin \ + $fs/sys \ + $fs/tmp \ + $fs/usr/bin \ + $fs/usr/games \ + $fs/usr/lib \ + $fs/usr/local \ + $fs/usr/sbin \ + $fs/usr/share/doc \ + $fs/var/cache \ + $fs/var/games \ + $fs/var/lib \ + $fs/var/lock \ + $fs/var/log/slitaz \ + $fs/var/spool \ + $fs/var/tmp \ + $fs/var/run + + # Daemons may store the pid files in /var/run + # from 5.0 /var/run is mounted as tmpfs + #ln -s /run $fs/var/run + + # Copy all installed files and set permissions. + cp -a $install/* $fs + + chown -R root.root $fs/* + chmod 1777 $fs/tmp + chmod 640 $fs/etc/shadow + chmod 640 $fs/etc/gshadow + chmod 0750 $fs/root + + # Populate /dev with $fs/sbin/mktazdevs.sh. + $fs/sbin/mktazdevs.sh $fs/dev + + # Creat /etc/mtab symlink. + cd $fs/etc + ln -s /proc/mounts mtab + + # Fix httphelper link + cd $fs/usr/lib/slitaz + ln -s httphelper.sh httphelper +} + +# Pre and post install to backup all /etc/settings +# +pre_install() +{ + local root + root=$1 + cp -a $root/etc $root/tmp/etc.bak 2>/dev/null + # Remove old /var/run symlink + rm -f $root/var/run +} + +post_install() +{ + local root + root=$1 + cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null + rm -rf $root/tmp/etc.bak + + # Reset permission. + chmod 640 $root/etc/shadow + chmod 640 $root/etc/gshadow + + if ! grep -q audio $root/etc/group; then + chroot $root/ /bin/addgroup -g 20 audio + fi +} + +pre_remove() +{ + # We can not remove this package ! + exit 1 +}