wok diff slitaz-configs/receipt @ rev 16167

ARM: improve slitaz-configs*
author Christophe Lincoln <pankso@slitaz.org>
date Sat Mar 29 13:56:21 2014 +0100 (2014-03-29)
parents 1e20660220da
children 08a3c649e683
line diff
     1.1 --- a/slitaz-configs/receipt	Sun Jan 19 13:35:48 2014 +0100
     1.2 +++ b/slitaz-configs/receipt	Sat Mar 29 13:56:21 2014 +0100
     1.3 @@ -2,6 +2,7 @@
     1.4  
     1.5  PACKAGE="slitaz-configs"
     1.6  VERSION="5.2.2"
     1.7 +ARM_VERSION="0.1"
     1.8  CATEGORY="base-system"
     1.9  SHORT_DESC="SliTaz config files and artwork."
    1.10  MAINTAINER="pankso@slitaz.org"
    1.11 @@ -10,46 +11,75 @@
    1.12  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13  WGET_URL="http://hg.slitaz.org/slitaz-configs/archive/$VERSION.tar.gz"
    1.14  CONFIG_FILES="/etc/slitaz/applications.conf"
    1.15 +HOST_ARCH="i486 arm"
    1.16  
    1.17  DEPENDS="slitaz-configs-base xorg-libXcomposite xorg-libXdamage xorg-xcompmgr \
    1.18  transset-df ttf-dejavu slim"
    1.19  
    1.20 +# Special case for ARM since some (most) config files are in slitaz-arm repo.
    1.21 +# i486/arm common configs are provided by slitaz-configs-base.
    1.22 +case "$SLITAZ_ARCH" in
    1.23 +	arm*)
    1.24 +		VERSION="$ARM_VERSION"
    1.25 +		WEB_SITE="http://arm.slitaz.org/"
    1.26 +		DEPENDS="slitaz-configs-base ttf-dejavu slim" ;;
    1.27 +esac
    1.28 +
    1.29 +case "$ARCH" in
    1.30 +	arm*)
    1.31 +		VERSION="$ARM_VERSION"
    1.32 +		WEB_SITE="http://arm.slitaz.org/"
    1.33 +		TARBALL="$PACKAGE-arm-$VERSION.tar.bz2"
    1.34 +		WGET_URL="http://hg.slitaz.org/slitaz-arm/archive/tip.tar.bz2" ;;
    1.35 +esac
    1.36 +
    1.37  # Rules to configure and make the package.
    1.38  compile_rules()
    1.39  {
    1.40 -	make DESTDIR=$DESTDIR menu
    1.41 -	ln -s menu.en.xml $install/etc/xdg/openbox/menu.xml
    1.42 +	case "$ARCH" in
    1.43 +		i?86)
    1.44 +			make DESTDIR=$DESTDIR menu
    1.45 +			ln -s menu.en.xml $install/etc/xdg/openbox/menu.xml ;;
    1.46 +	esac
    1.47  }
    1.48  
    1.49  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.50  genpkg_rules()
    1.51  {
    1.52 -	# Copy rootfs files from the stuff and set permissions.
    1.53 -	mkdir -p $fs/etc/xdg/openbox $fs/usr/share
    1.54 -	cp -a $src/rootfs/etc/xdg/openbox $fs/etc/xdg
    1.55 -
    1.56 -	# /usr/share
    1.57 -	for i in applications lxdm slim slitaz
    1.58 -	do
    1.59 -		cp -r $src/rootfs/usr/share/$i $fs/usr/share
    1.60 -	done
    1.61 -
    1.62 -	cp -a $src/rootfs/usr/bin $fs/usr
    1.63 -	cp -a $src/rootfs/etc/lxpanel $fs/etc
    1.64 -	cp -a $src/rootfs/etc/slitaz $fs/etc
    1.65 -	cp -a $install/etc/xdg/openbox/menu.en.xml $install/etc/xdg/openbox/menu.xml \
    1.66 -		$fs/etc/xdg/openbox
    1.67 -
    1.68 +	cd ${src}
    1.69 +	case "$ARCH" in
    1.70 +		i?86)
    1.71 +			# Copy rootfs files from the stuff and set permissions.
    1.72 +			mkdir -p $fs/etc/xdg/openbox $fs/usr/share
    1.73 +			cp -a $src/rootfs/etc/xdg/openbox $fs/etc/xdg
    1.74 +		
    1.75 +			# /usr/share
    1.76 +			for i in applications lxdm slim slitaz
    1.77 +			do
    1.78 +				cp -r $src/rootfs/usr/share/$i $fs/usr/share
    1.79 +			done
    1.80 +		
    1.81 +			cp -a $src/rootfs/usr/bin $fs/usr
    1.82 +			cp -a $src/rootfs/etc/lxpanel $fs/etc
    1.83 +			cp -a $src/rootfs/etc/slitaz $fs/etc
    1.84 +			cp -a $install/etc/xdg/openbox/menu.en.xml $install/etc/xdg/openbox/menu.xml \
    1.85 +				$fs/etc/xdg/openbox ;;
    1.86 +		arm)
    1.87 +			cp -a rootfs/* ${fs} ;;
    1.88 +	esac
    1.89  	chown -R root.root $fs
    1.90  }
    1.91  
    1.92  post_install()
    1.93  {
    1.94 -	# By default slim provide a base theme and config file have both
    1.95 -	# base and slitaz who will be choose randomly, so make sure we use
    1.96 -	# only slitaz theme.
    1.97 -	if grep -q 'current_theme       slitaz,base' $1/etc/slim.conf; then
    1.98 -		sed -i s/"current_theme .*"/"current_theme       slitaz"/ \
    1.99 -			$1/etc/slim.conf
   1.100 -	fi
   1.101 +	case "$SLITAZ_ARCH" in
   1.102 +		i?86)
   1.103 +			# By default slim provide a base theme and config file have both
   1.104 +			# base and slitaz who will be choose randomly, so make sure we use
   1.105 +			# only slitaz theme.
   1.106 +			if grep -q 'current_theme       slitaz,base' $1/etc/slim.conf; then
   1.107 +				sed -i s/"current_theme .*"/"current_theme       slitaz"/ \
   1.108 +					$1/etc/slim.conf
   1.109 +			fi ;;
   1.110 +	esac
   1.111  }