wok-next rev 19828

Add LibreOffice (with langpacks); up compton, cookutils, cppunit.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Aug 02 20:14:13 2017 +0300 (2017-08-02)
parents 2017cce9bab8
children fb478984fbc8
files LibreOffice/receipt compton/receipt cookutils/receipt cppunit-dev/receipt cppunit/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/LibreOffice/receipt	Wed Aug 02 20:14:13 2017 +0300
     1.3 @@ -0,0 +1,159 @@
     1.4 +# SliTaz package receipt v2.
     1.5 +
     1.6 +PACKAGE="LibreOffice"
     1.7 +VERSION="5.4.0"
     1.8 +CATEGORY="office"
     1.9 +SHORT_DESC="Powerful office suite"
    1.10 +MAINTAINER="al.bobylev@gmail.com"
    1.11 +LICENSE="MPL2"
    1.12 +WEB_SITE="https://www.libreoffice.org/"
    1.13 +HOST_ARCH="i486 x86_64"
    1.14 +
    1.15 +case $ARCH in
    1.16 +	i486)   lo_arch="x86"   ; lo_arch2="x86"   ;;
    1.17 +	x86_64) lo_arch="x86_64"; lo_arch2="x86-64";;
    1.18 +esac
    1.19 +
    1.20 +TARBALL="LibreOffice_${VERSION}_Linux_${lo_arch2}_deb.tar.gz"
    1.21 +WGET_URL="http://download.documentfoundation.org/libreoffice/stable/$VERSION/deb/$lo_arch/$TARBALL"
    1.22 +
    1.23 +SPLIT="LibreOffice-langpack-de LibreOffice-langpack-es LibreOffice-langpack-fr \
    1.24 +LibreOffice-langpack-it LibreOffice-langpack-pt-BR LibreOffice-langpack-ru \
    1.25 +LibreOffice LibreOffice-extra"
    1.26 +
    1.27 +sizes() { du -chs ${1:-$fs} | awk 'END{print $1}'; }
    1.28 +
    1.29 +# Rules to configure and make the package.
    1.30 +compile_rules()
    1.31 +{
    1.32 +	echo 'Checking language packages...'
    1.33 +	for i in de es fr it pt-BR ru; do
    1.34 +		TARBALL="LibreOffice_${VERSION}_Linux_${lo_arch2}_deb_langpack_$i.tar.gz"
    1.35 +		WGET_URL="$(dirname $WGET_URL)/$TARBALL"
    1.36 +		[ -e "$SRC/$TARBALL" ] || wget -O $SRC/$TARBALL $WGET_URL
    1.37 +		tar -xzf $SRC/$TARBALL
    1.38 +	done
    1.39 +	action 'Extracting LibreOffice...'
    1.40 +	# extract all deb's filesystem into $install
    1.41 +	find . -name '*.deb' -exec dpkg-deb -x '{}' $install \;
    1.42 +	sizes $install
    1.43 +
    1.44 +	# substitute desktop files symlinks by actual files (to be processed by cook)
    1.45 +	find $install/usr/share/applications/ -type l -delete # no way to remove 'broken' symlinks by `rm`
    1.46 +	find $install/opt/libreoffice${VERSION%.*}/share/xdg/ -type f | \
    1.47 +	while read i; do
    1.48 +		mv $i $install/usr/share/applications/libreoffice${VERSION%.*}-$(basename $i)
    1.49 +	done
    1.50 +	# remove useless (after processing by sdft) lines from desktop files
    1.51 +	sed -i '/^#/d; /^Actions=/d; s|X-Red-Hat-Base;||;
    1.52 +		s|X-MandrivaLinux-[^;]*;||' $install/usr/share/applications/*.desktop
    1.53 +}
    1.54 +
    1.55 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.56 +genpkg_rules()
    1.57 +{
    1.58 +	case $PACKAGE in
    1.59 +		LibreOffice-langpack-*)
    1.60 +			lang=${PACKAGE#*langpack-}
    1.61 +			copy *$lang.res $lang/ $lang.zip dict-$lang/ *-$lang.xcd *_$lang.xcd
    1.62 +
    1.63 +			action 'Removing unwanted files...'
    1.64 +			find $fs -name '*.properties' | \
    1.65 +			while read i; do
    1.66 +				j=$(basename $i .properties)
    1.67 +				case $j in
    1.68 +					*de|*en_US|*es|*fr|*it|*pt_BR|*ru) ;;
    1.69 +					*) rm $i;;
    1.70 +				esac
    1.71 +			done
    1.72 +			sizes
    1.73 +
    1.74 +			case $lang in
    1.75 +				de) L='German';;
    1.76 +				es) L='Spanish';;
    1.77 +				fr) L='French';;
    1.78 +				it) L='Italian';;
    1.79 +				pt-BR) L='Portuguese Brazilian';;
    1.80 +				ru) L='Russian';;
    1.81 +			esac
    1.82 +			CAT="localization|$L langpack"
    1.83 +			DEPENDS="LibreOffice"
    1.84 +			;;
    1.85 +		LibreOffice)
    1.86 +			copy @std *.inc
    1.87 +			remove_already_packed
    1.88 +			DEPENDS="gtk+ dbus-glib libcomerr libkrb5 xorg-libSM \
    1.89 +			xorg-libXinerama xorg-libXrandr"
    1.90 +			SUGGESTED="gst1-plugins-base mesa"
    1.91 +
    1.92 +			action 'Info: current size is...'; sizes
    1.93 +
    1.94 +			action 'Removing Java support...'
    1.95 +			# remove Java support
    1.96 +			find $fs -name '*.jar' -delete
    1.97 +			rm $fs/opt/libreoffice${VERSION%.*}/program/libofficebean.so
    1.98 +			sizes
    1.99 +
   1.100 +			action 'Removing unwanted files...'
   1.101 +			# remove kde & qt support
   1.102 +			rm $fs/opt/libreoffice${VERSION%.*}/program/libkde4be1lo.so
   1.103 +			rm $fs/opt/libreoffice${VERSION%.*}/program/libvclplug_kde4lo.so
   1.104 +
   1.105 +			# remove gstreamer0 support (libavmediagst_0_10.so)
   1.106 +			# leave  gstreamer1 support (libavmediagst.so)
   1.107 +			rm $fs/opt/libreoffice${VERSION%.*}/program/libavmediagst_0_10.so
   1.108 +
   1.109 +			# remove multilingual files
   1.110 +			find $fs -name '*.properties' | \
   1.111 +			while read i; do
   1.112 +				j=$(basename $i .properties)
   1.113 +				case $j in
   1.114 +					*de|*en_US|*es|*fr|*it|*pt_BR|*ru) ;;
   1.115 +					*) rm $i;;
   1.116 +				esac
   1.117 +			done
   1.118 +
   1.119 +			# remove icon themes; leave only default tango theme (-11MB)
   1.120 +			for i in $fs/opt/libreoffice${VERSION%.*}/share/config/images*.zip; do
   1.121 +				case $(basename $i .zip) in
   1.122 +					*tango) ;;
   1.123 +					*) rm $i;;
   1.124 +				esac
   1.125 +			done
   1.126 +
   1.127 +			# remove wiki-publisher extension
   1.128 +			rm -r $fs/opt/libreoffice${VERSION%.*}/share/extensions/wiki-publisher
   1.129 +
   1.130 +			# remove unneded desktop integration
   1.131 +			rm -r $fs/usr/lib/
   1.132 +			cd $fs/usr/share/
   1.133 +			rm -r mimelnk/ mime-info/ application-registry/ appdata/
   1.134 +			rm -r icons/locolor/ icons/gnome/
   1.135 +			cd icons/hicolor/
   1.136 +			rm -r scalable/ 512x512/ 256x256/ 128x128/ 32x32/
   1.137 +
   1.138 +			# remove other files
   1.139 +			rm -r $fs/opt/libreoffice${VERSION%.*}/readmes/
   1.140 +
   1.141 +			sizes
   1.142 +
   1.143 +			#	action 'Compressing xml files...'
   1.144 +			#	# compress xml-based files
   1.145 +			#	t="$(mktemp)"
   1.146 +			#	find $fs -type f \( -name '*.xml' -o -name 'xsl' \) | \
   1.147 +			#	while read i; do
   1.148 +			#		xmlstarlet c14n --without-comments "$i" | \
   1.149 +			#		xmlstarlet --no-doc-namespace sel -B -t -c '*' > $t
   1.150 +			#		cat "$t" > "$i"
   1.151 +			#	done
   1.152 +			#	sizes
   1.153 +			;;
   1.154 +
   1.155 +		LibreOffice-extra)
   1.156 +			# all the rest...
   1.157 +			copy @std *.inc
   1.158 +			remove_already_packed
   1.159 +			CAT="office|extra files"
   1.160 +			;;
   1.161 +	esac
   1.162 +}
     2.1 --- a/compton/receipt	Tue Aug 01 03:09:08 2017 +0300
     2.2 +++ b/compton/receipt	Wed Aug 02 20:14:13 2017 +0300
     2.3 @@ -1,36 +1,42 @@
     2.4 -# SliTaz package receipt.
     2.5 +# SliTaz package receipt v2.
     2.6  
     2.7  PACKAGE="compton"
     2.8 -VERSION="0.1_beta2"
     2.9 +VERSION="0.1_beta2+87" # 87 commits to master since release 0.1_beta2
    2.10 +COMMIT="316eac0"
    2.11  CATEGORY="x-window"
    2.12 -SHORT_DESC="Light X Compositor new generation"
    2.13 +SHORT_DESC="A compositor for X"
    2.14  MAINTAINER="pankso@slitaz.org"
    2.15  LICENSE="MIT"
    2.16 -TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.17  WEB_SITE="https://github.com/chjj/compton"
    2.18 -WGET_URL="https://github.com/chjj/$PACKAGE/archive/v${VERSION}.tar.gz"
    2.19  HOST_ARCH="i486 arm"
    2.20  
    2.21 -DEPENDS="xorg-libXcomposite xorg-libXrandr libdrm xorg-xwininfo xorg-xprop"
    2.22 -BUILD_DEPENDS="xorg-libXcomposite-dev xorg-libXrandr-dev libdrm-dev \
    2.23 -xorg-libXfixes-dev xorg-libXdamage-dev xorg-libXinerama-dev pcre-dev"
    2.24 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.25 +WGET_URL="https://github.com/chjj/compton/archive/${COMMIT:-v$VERSION}.tar.gz"
    2.26 +
    2.27 +BUILD_DEPENDS="pcre-dev xorg-libX11-dev xorg-libXcomposite-dev \
    2.28 +xorg-libXfixes-dev xorg-libXdamage-dev xorg-libXrender-dev xorg-libXext-dev \
    2.29 +xorg-libXrandr-dev xorg-libXinerama-dev libconfig-dev dbus-dev libdrm-dev \
    2.30 +mesa-dev asciidoc libxml2-tools docbook-xsl"
    2.31  
    2.32  # Rules to configure and make the package.
    2.33  compile_rules()
    2.34  {
    2.35 -	sed -i "s:\(COMPTON_VERSION ?= \)git.*:\1v${VERSION}:" Makefile
    2.36  	make \
    2.37 -		NO_LIBCONFIG="true" \
    2.38 -		NO_VSYNC_OPENGL="true" \
    2.39 -		NO_DBUS="true"
    2.40 +		COMPTON_VERSION=v$VERSION \
    2.41 +		PREFIX=/usr \
    2.42 +		compton docs &&
    2.43 +	make install
    2.44 +	mkdir -p $install/etc/xdg/compton
    2.45 +	cp $src/compton.sample.conf $install/etc/xdg/compton/compton.conf
    2.46 +	cp -r $stuff/autostart $install/etc/xdg/
    2.47  }
    2.48  
    2.49  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.50  genpkg_rules()
    2.51  {
    2.52 -	mkdir -p $fs/etc/xdg/compton $fs/usr/bin
    2.53 -	cp $src/compton $fs/usr/bin
    2.54 -	cp $src/compton.sample.conf $fs/etc/xdg/compton/compton.conf
    2.55 -	cp -r $stuff/autostart $fs/etc/xdg
    2.56 +	copy etc/ bin/	# skip icons
    2.57 +	DEPENDS="dbus libconfig mesa pcre xorg-libX11 xorg-libXcomposite \
    2.58 +	xorg-libXdamage xorg-libXext xorg-libXfixes xorg-libXinerama \
    2.59 +	xorg-libXrandr xorg-libXrender   xorg-xwininfo xorg-xprop"
    2.60 +	CONFIG_FILES="/etc/xdg/compton/compton.conf"
    2.61  }
    2.62 -
     3.1 --- a/cookutils/receipt	Tue Aug 01 03:09:08 2017 +0300
     3.2 +++ b/cookutils/receipt	Wed Aug 02 20:14:13 2017 +0300
     3.3 @@ -1,13 +1,12 @@
     3.4  # SliTaz package receipt v2.
     3.5  
     3.6  PACKAGE="cookutils"
     3.7 -VERSION="953"
     3.8 +VERSION="954"
     3.9  CATEGORY="base-system"
    3.10  SHORT_DESC="SliTaz packages builder new generation"
    3.11  MAINTAINER="pankso@slitaz.org"
    3.12  LICENSE="GPL3"
    3.13  WEB_SITE="http://www.slitaz.org/"
    3.14 -TAGS="slitaz"
    3.15  HOST_ARCH="i486 arm"
    3.16  
    3.17  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    3.18 @@ -27,6 +26,7 @@
    3.19  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.20  genpkg_rules()
    3.21  {
    3.22 +	TAGS="slitaz"
    3.23  	case $PACKAGE in
    3.24  		cookutils)
    3.25  			copy '*/'; rm -r $fs/etc/init.d
     4.1 --- a/cppunit-dev/receipt	Tue Aug 01 03:09:08 2017 +0300
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,23 +0,0 @@
     4.4 -# SliTaz package receipt.
     4.5 -
     4.6 -PACKAGE="cppunit-dev"
     4.7 -VERSION="1.12.1"
     4.8 -CATEGORY="development"
     4.9 -SHORT_DESC="Devel file for the cppunit framework."
    4.10 -MAINTAINER="pankso@slitaz.org"
    4.11 -LICENSE="LGPL2.1"
    4.12 -WEB_SITE="http://cppunit.sourceforge.net/"
    4.13 -WANTED="cppunit"
    4.14 -
    4.15 -DEPENDS="pkg-config"
    4.16 -
    4.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
    4.18 -genpkg_rules()
    4.19 -{
    4.20 -	mkdir -p $fs/usr/lib $fs/usr/share
    4.21 -	cp -a $install/usr/bin $fs/usr
    4.22 -	cp -a $install/usr/include $fs/usr
    4.23 -	cp -a $install/usr/lib/*.*a $fs/usr/lib
    4.24 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
    4.25 -	cp -a $install/usr/share/aclocal $fs/usr/share
    4.26 -}
     5.1 --- a/cppunit/receipt	Tue Aug 01 03:09:08 2017 +0300
     5.2 +++ b/cppunit/receipt	Wed Aug 02 20:14:13 2017 +0300
     5.3 @@ -1,30 +1,30 @@
     5.4 -# SliTaz package receipt.
     5.5 +# SliTaz package receipt v2.
     5.6  
     5.7  PACKAGE="cppunit"
     5.8  VERSION="1.12.1"
     5.9  CATEGORY="system-tools"
    5.10 -SHORT_DESC="A C++ unit testing framework."
    5.11 +SHORT_DESC="A C++ unit testing framework"
    5.12  MAINTAINER="pankso@slitaz.org"
    5.13  LICENSE="LGPL2.1"
    5.14 +WEB_SITE="https://sourceforge.net/projects/cppunit/"
    5.15 +
    5.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    5.17 -WEB_SITE="http://cppunit.sourceforge.net/"
    5.18  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    5.19  
    5.20  BUILD_DEPENDS="gfortran doxygen coreutils-path"
    5.21 +SPLIT="cppunit-dev"
    5.22  
    5.23  # Rules to configure and make the package.
    5.24  compile_rules()
    5.25  {
    5.26 -	cd $src
    5.27 -	./configure \
    5.28 -		--prefix=/usr \
    5.29 -		$CONFIGURE_ARGS &&
    5.30 -	make && make install
    5.31 +	./configure $CONFIGURE_ARGS && make && make install
    5.32  }
    5.33  
    5.34  # Rules to gen a SliTaz package suitable for Tazpkg.
    5.35  genpkg_rules()
    5.36  {
    5.37 -	mkdir -p $fs/usr/lib
    5.38 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    5.39 +	case $PACKAGE in
    5.40 +		cppunit) copy @std;;
    5.41 +		*-dev)   copy @dev;;
    5.42 +	esac
    5.43  }