wok-next diff hal/receipt @ rev 20163

hal: receipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 01 17:42:43 2017 +0100 (2017-11-01)
parents ff5fd8788cd9
children d43bf7aae921
line diff
     1.1 --- a/hal/receipt	Fri May 27 01:40:23 2016 +0300
     1.2 +++ b/hal/receipt	Wed Nov 01 17:42:43 2017 +0100
     1.3 @@ -1,4 +1,4 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="hal"
     1.8  VERSION="0.5.14"
     1.9 @@ -11,10 +11,10 @@
    1.10  WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
    1.11  CROSS="error: cannot check for file existence when cross compiling"
    1.12  
    1.13 -DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-blkid libusb-compat"
    1.14  BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \
    1.15  util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev pkg-config \
    1.16  libv4l-dev"
    1.17 +SPLIT="hal hal-dev hal-extra hal-scripts"
    1.18  
    1.19  EXTRA="
    1.20  hald-addon-cpufreq
    1.21 @@ -57,44 +57,80 @@
    1.22  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.23  genpkg_rules()
    1.24  {
    1.25 -	mkdir -p $fs/usr/lib $fs/usr/share
    1.26 -	cp -a $install/etc $fs
    1.27 -	cp -a $install/var $fs
    1.28 -	cp -a $install/usr/bin $fs/usr
    1.29 -	cp -a $install/usr/sbin $fs/usr
    1.30 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.31 -	cp -a $install/usr/lib/hal $fs/usr/lib
    1.32 -	cp -a $install/usr/share/hal $fs/usr/share
    1.33 -	chmod -R +x $fs/usr/lib/hal/scripts/*
    1.34 -	# Remove a few run time lib and strip.
    1.35 -	for lib in $EXTRA
    1.36 -	do
    1.37 -		rm $fs/usr/lib/hal/$lib
    1.38 -	done
    1.39 -	strip -s $fs/usr/lib/hal/* 2>/dev/null
    1.40 -	# Init script
    1.41 -	cp -a stuff/etc $fs
    1.42 +	case $PACKAGE in
    1.43 +	hal)
    1.44 +		DEPENDS="dbus dbus-glib slitaz-base-files udev \
    1.45 +			util-linux-blkid libusb-compat"
    1.46 +		mkdir -p $fs/usr/lib $fs/usr/share
    1.47 +		cp -a $install/etc $fs
    1.48 +		cp -a $install/var $fs
    1.49 +		cp -a $install/usr/bin $fs/usr
    1.50 +		cp -a $install/usr/sbin $fs/usr
    1.51 +		cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.52 +		cp -a $install/usr/lib/hal $fs/usr/lib
    1.53 +		cp -a $install/usr/share/hal $fs/usr/share
    1.54 +		chmod -R +x $fs/usr/lib/hal/scripts/*
    1.55 +		# Remove a few run time lib and strip.
    1.56 +		for lib in $EXTRA
    1.57 +		do
    1.58 +			rm $fs/usr/lib/hal/$lib
    1.59 +		done
    1.60 +		strip -s $fs/usr/lib/hal/* 2>/dev/null
    1.61 +		# Init script
    1.62 +		cp -a stuff/etc $fs
    1.63  
    1.64 -	# Policy for ntfs-3g
    1.65 -	cp -a stuff/policy $fs/usr/share/hal/fdi/
    1.66 -	chown -R root.root $fs
    1.67 +		# Policy for ntfs-3g
    1.68 +		cp -a stuff/policy $fs/usr/share/hal/fdi/
    1.69 +		chown -R root.root $fs
    1.70  
    1.71 -	# exclude unwanted fdi files
    1.72 -	rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
    1.73 -	rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
    1.74 -	rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
    1.75 -	rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
    1.76 -	rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
    1.77 +		# exclude unwanted fdi files
    1.78 +		rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
    1.79 +		rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
    1.80 +		rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
    1.81 +		rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
    1.82 +		rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
    1.83  	
    1.84 -	# change bash to sh in hal scripts
    1.85 -	sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal* 
    1.86 -	sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal* 
    1.87 -	# use full-path
    1.88 -	sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal* 
    1.89 -	sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal* 
    1.90 +		# change bash to sh in hal scripts
    1.91 +		sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal* 
    1.92 +		sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal* 
    1.93 +		# use full-path
    1.94 +		sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal* 
    1.95 +		sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal* 
    1.96 +		;;
    1.97 +	hal-dev)
    1.98 +		CAT="development|Hal devel files."
    1.99 +		DEPENDS="hal dbus-dev pkg-config"
   1.100 +		mkdir -p $fs/usr/lib
   1.101 +		cp -a $install/usr/include $fs/usr
   1.102 +		cp -a $install/usr/lib/*.*a $fs/usr/lib
   1.103 +		cp -a $install/usr/lib/pkgconfig $fs/usr/lib
   1.104 +		;;
   1.105 +	hal-extra)
   1.106 +		CAT="x-window|Hal extra lib and fdi files."
   1.107 +		DEPENDS="dbus dbus-glib glib hal"
   1.108 +		mkdir -p $fs/usr/lib/hal $fs/usr/share/hal/fdi/policy/10osvendor
   1.109 +		for lib in $EXTRA
   1.110 +		do
   1.111 +			cp $install/usr/lib/hal/$lib $fs/usr/lib/hal
   1.112 +		done
   1.113 +	
   1.114 +		# copy some excluded files from hal
   1.115 +		cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi $fs/usr/share/hal/fdi/policy/10osvendor
   1.116 +		cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi $fs/usr/share/hal/fdi/policy/10osvendor
   1.117 +		cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi $fs/usr/share/hal/fdi/policy/10osvendor
   1.118 +		cp -a $install/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi $fs/usr/share/hal/fdi/policy/10osvendor
   1.119 +		cp -a $install/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi $fs/usr/share/hal/fdi/policy/10osvendor
   1.120 +		;;
   1.121 +	hal-scripts)
   1.122 +		CAT="x-window|Hal scripts files."
   1.123 +		DEPENDS="dbus dbus-glib glib hal"
   1.124 +		mkdir -p $fs/usr/lib/hal
   1.125 +		cp -a $install/usr/lib/hal/scripts $fs/usr/lib/hal
   1.126 +		;;
   1.127 +	esac
   1.128  }
   1.129  
   1.130 -pre_install()
   1.131 +pre_install_hal()
   1.132  {
   1.133  	# Go for echoing on configuration files if any haldaemon user
   1.134  	# was found.
   1.135 @@ -117,7 +153,7 @@
   1.136  	fi
   1.137  }
   1.138  
   1.139 -pre_remove()
   1.140 +pre_remove_hal()
   1.141  {
   1.142  	/etc/init.d/hald stop
   1.143  	deluser haldaemon