wok-next rev 20345
Up/patch tazpkg
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 18 14:07:35 2017 +0200 (2017-11-18) |
parents | 16a417e1e89d |
children | 48817c16eab3 |
files | tazpkg/receipt tazpkg/stuff/patches/r954.diff tazpkg/stuff/patches/release.patch tazpkg/stuff/patches/series tazpkg/stuff/patches/tazpanel.desktop.patch tazpkg/stuff/patches/tazpkg.conf.patch tazpkg/stuff/tazpkg.html |
line diff
1.1 --- a/tazpkg/receipt Sat Nov 18 13:59:34 2017 +0200 1.2 +++ b/tazpkg/receipt Sat Nov 18 14:07:35 2017 +0200 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt v2. 1.5 1.6 PACKAGE="tazpkg" 1.7 -VERSION="951" 1.8 +VERSION="954" 1.9 CATEGORY="base-system" 1.10 SHORT_DESC="SliTaz packages manager" 1.11 MAINTAINER="pankso@slitaz.org" 1.12 @@ -15,41 +15,25 @@ 1.13 BUILD_DEPENDS_arm="" 1.14 BUILD_DEPENDS="gettext tidy-html5 libnotify-dev" 1.15 1.16 -# Rules to gen a SliTaz package suitable for TazPkg. 1.17 -# 1.18 -# TazPkg is SliTaz packages manager. On an other GNU/Linux install 1.19 -# can be do with `make install` from the sources directory. 1.20 -# 1.21 - 1.22 -# Rules to configure and make the package. 1.23 -compile_rules() 1.24 -{ 1.25 - make && make DESTDIR=$DESTDIR VERSION=$VERSION install 1.26 -} 1.27 - 1.28 -genpkg_rules() 1.29 -{ 1.30 - cp -a $install/* $fs 1.31 - chown -R root.root $fs 1.32 +compile_rules() { 1.33 + make && 1.34 + make DESTDIR=$DESTDIR VERSION=$VERSION install || return 1 1.35 1.36 # Default icon for mimetype (freedesktop standard compliant file 1.37 # manager will diplay a tazpkg icon for SliTaz packages). 1.38 - icons="$fs/usr/share/icons/hicolor/32x32/mimetypes" 1.39 + icons="$install/usr/share/icons/hicolor/32x32/mimetypes" 1.40 mkdir -p $icons 1.41 ln -s ../apps/tazpkg.png $icons/application-x-tazpkg.png 1.42 + 1.43 + rm $install/usr/share/doc/tazpkg/tazpkg.html 1.44 + cp $stuff/tazpkg.html $install/usr/share/doc/tazpkg/ 1.45 + 1.46 + chown -R root.root $install 1.47 +} 1.48 + 1.49 +genpkg_rules() { 1.50 + copy @std doc/ hicolor/ *.mo 1.51 DEPENDS="busybox gettext-base" 1.52 SUGGESTED="tazpanel" 1.53 TAGS="slitaz package-manager" 1.54 } 1.55 - 1.56 -post_install() { 1.57 - # Make sure new config is present 1.58 - if ! grep -q ^NOTIFY_GEOM "$1/etc/slitaz/tazpkg.conf"; then 1.59 - cat >> "$1/etc/slitaz/tazpkg.conf" <<EOT 1.60 -# The geometry of the desktop notification 1.61 -NOTIFY_GEOM="360x80-0+24" 1.62 - 1.63 -EOT 1.64 - fi 1.65 - : 1.66 -}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/tazpkg/stuff/patches/r954.diff Sat Nov 18 14:07:35 2017 +0200 2.3 @@ -0,0 +1,31 @@ 2.4 + 2.5 +# HG changeset patch 2.6 +# User Richard Dunbar <mojo@slitaz.org> 2.7 +# Date 1509739839 14400 2.8 +# Node ID ecb60a87e3e840843ad7698cee37380f374819ec 2.9 +# Parent 40c8ad3478fdb0436487ff71966099a7546c7492 2.10 +modules/install: PKG_SUM restores update new build detection 2.11 + 2.12 +diff -r 40c8ad3478fd -r ecb60a87e3e8 modules/install 2.13 +--- a/modules/install Mon Oct 09 17:16:43 2017 +0100 2.14 ++++ b/modules/install Fri Nov 03 16:10:39 2017 -0400 2.15 +@@ -620,7 +620,8 @@ 2.16 + 2.17 + # Remove newlines from some receipts 2.18 + DEPENDS=$(echo $DEPENDS) 2.19 +- 2.20 ++ PKG_SUM="$(fgrep " $PACKAGE-$VERSION$EXTRAVERSION.tazpkg" "$PKGS_DB/installed.$SUM" | cut -d' ' -f1)" 2.21 ++ 2.22 + # Calculate "release checksum": md5sum of file containing md5sums of: 2.23 + # a) all files, b) receipt, and c) description.txt. 2.24 + rsumf=$(mktemp) 2.25 +@@ -637,7 +638,7 @@ 2.26 + sed -i "/^$PACKAGE /d" "$ii" 2.27 + 2.28 + cat >> "$ii" <<EOT 2.29 +-$PACKAGE $VERSION$EXTRAVERSION $CATEGORY $SHORT_DESC $WEB_SITE $TAGS $SIZES $DEPENDS $RSUM 2.30 ++$PACKAGE $VERSION$EXTRAVERSION $CATEGORY $SHORT_DESC $WEB_SITE $TAGS $SIZES $DEPENDS $PKG_SUM 2.31 + EOT 2.32 + 2.33 + TEMP_FILE="$(mktemp)" 2.34 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tazpkg/stuff/patches/release.patch Sat Nov 18 14:07:35 2017 +0200 3.3 @@ -0,0 +1,11 @@ 3.4 +--- a/modules/getenv 3.5 ++++ b/modules/getenv 3.6 +@@ -69,7 +69,7 @@ 3.7 + missing_dir "$root/etc/slitaz/" 3.8 + missing_file "$root/etc/slitaz/slitaz.conf" '/etc/slitaz/slitaz.conf' 3.9 + missing_file "$root/etc/slitaz/tazpkg.conf" '/etc/slitaz/tazpkg.conf' 3.10 +-missing_file "$root/etc/slitaz-release"; fill "$root/etc/slitaz-release" 'cooking' 3.11 ++missing_file "$root/etc/slitaz-release"; fill "$root/etc/slitaz-release" 'next' 3.12 + 3.13 + # Read configuration 3.14 + if [ -n "$root" ]; then
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/tazpkg/stuff/patches/series Sat Nov 18 14:07:35 2017 +0200 4.3 @@ -0,0 +1,4 @@ 4.4 +-Rp1|r954.diff # revert changeset # 954 4.5 +release.patch 4.6 +tazpanel.desktop.patch 4.7 +tazpkg.conf.patch
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/tazpkg/stuff/patches/tazpanel.desktop.patch Sat Nov 18 14:07:35 2017 +0200 5.3 @@ -0,0 +1,19 @@ 5.4 +--- a/applications/tazpanel-pkgs.desktop 5.5 ++++ b/applications/tazpanel-pkgs.desktop 5.6 +@@ -1,11 +1,10 @@ 5.7 + [Desktop Entry] 5.8 + Type=Application 5.9 +-Name=Package Manager 5.10 +-Name[fr]=Gestionnaire de paquets 5.11 +-Name[pt]=Gerenciador de Pacotes 5.12 +-Name[pt_BR]=Gerenciador de Pacotes 5.13 +-Name[ru]=Менеджер пакетов 5.14 ++Name=Package Manager web interface 5.15 ++Name[fr]=Interface web du gestionnaire de paquets 5.16 ++Name[pt_BR]=Interface da web do gerenciador de pacotes 5.17 ++Name[ru]=Веб-интерфейс менеджера пакетов 5.18 + TryExec=tazweb 5.19 +-Exec=sh -c 'tazweb root:$$@127.0.0.1:82/user/pkgs.cgi' 5.20 ++Exec=tazbox su tazpanel pkgs 5.21 + Icon=system-software-installer 5.22 + Categories=Settings;PackageManager;
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/tazpkg/stuff/patches/tazpkg.conf.patch Sat Nov 18 14:07:35 2017 +0200 6.3 @@ -0,0 +1,9 @@ 6.4 +--- a/tazpkg.conf 6.5 ++++ b/tazpkg.conf 6.6 +@@ -10,4 +10,5 @@ 6.7 + # Packages cache directory. 6.8 + CACHE_DIR="/var/cache/tazpkg" 6.9 + 6.10 +- 6.11 ++# The geometry of the desktop notification 6.12 ++NOTIFY_GEOM="360x80-0+24"
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/tazpkg/stuff/tazpkg.html Sat Nov 18 14:07:35 2017 +0200 7.3 @@ -0,0 +1,17 @@ 7.4 +<!DOCTYPE html> 7.5 +<script> 7.6 +var uilang = navigator.language || navigator.userLanguage; 7.7 +var lang = uilang.split('-')[0]; 7.8 +switch (lang) { 7.9 + case 'de': 7.10 + case 'es': 7.11 + case 'fr': 7.12 + case 'pt': 7.13 + case 'ru': 7.14 + found = lang; 7.15 + break; 7.16 + default: 7.17 + found = 'en'; 7.18 +} 7.19 +window.location = 'tazpkg.' + found + '.html'; 7.20 +</script>