wok annotate tazpkg/receipt @ rev 25804

created recipe for wm-switcher
author Hans-G?nter Theisgen
date Wed Nov 13 15:16:07 2024 +0100 (3 months ago)
parents 7e911016a644
children
rev   line source
pankso@10 1 # SliTaz package receipt.
pankso@10 2
pankso@10 3 PACKAGE="tazpkg"
mojo@20139 4 VERSION="944"
pankso@192 5 CATEGORY="base-system"
al@18236 6 SHORT_DESC="SliTaz packages manager"
pankso@10 7 MAINTAINER="pankso@slitaz.org"
pascal@15021 8 LICENSE="GPL3"
al@18286 9 WEB_SITE="http://www.slitaz.org/"
slaxemulator@9506 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
slaxemulator@10929 11 WGET_URL="http://hg.slitaz.org/tazpkg/archive/$VERSION.tar.gz"
jozee@4973 12 TAGS="slitaz package-manager"
pankso@12778 13 HOST_ARCH="i486 arm"
pankso@10 14
pascal@14469 15 DEPENDS="busybox gettext-base"
pascal@18015 16 SUGGESTED="tazpanel"
al@18968 17 BUILD_DEPENDS="gettext tidy-html5 libnotify-dev"
pankso@12879 18
pankso@12879 19 # Gettext is part of cross-chroot
pankso@12879 20 case "$ARCH" in
pankso@12879 21 arm) BUILD_DEPENDS="" ;;
pankso@12879 22 esac
pankso@12879 23
pascal@24069 24 current_version()
pascal@24069 25 {
pascal@24069 26 wget -O - http://hg.slitaz.org/$PACKAGE/ 2>/dev/null | \
pascal@24069 27 sed '/^Changeset/!d;s|.*">|http://hg.slitaz.org/'$PACKAGE'/rev/|;s|<.*||' | \
pascal@24069 28 xargs wget -O - 2>/dev/null | sed '/rev /!d;s|.*rev ||;s| .*||'
pascal@24069 29 }
pascal@24069 30
al@18049 31 # Rules to gen a SliTaz package suitable for TazPkg.
pankso@10 32 #
al@18254 33 # TazPkg is SliTaz packages manager. On an other GNU/Linux install
al@18254 34 # can be do with `make install` from the sources directory.
pankso@10 35 #
pankso@6776 36
pankso@6776 37 # Rules to configure and make the package.
pankso@6776 38 compile_rules()
pankso@6776 39 {
shann@25677 40 # Thanks Rantanplan, fix miss translate in tazpkg.fr.html
shann@25677 41 patch -p1 < $stuff/tazpkg-doc-fr.patch
shann@25677 42
shann@25677 43 # Patch for upgrade core system package first
shann@25677 44 patch -p1 < $stuff/upgrade-core-pkg.patch
shann@25677 45 rm modules/upgrade.orig
shann@25677 46
pascal@20656 47 sed -i 's|\. receipt|. ./receipt|' */*
pascal@17427 48 make && make DESTDIR=$DESTDIR VERSION=$VERSION install
pankso@6776 49 }
pankso@6776 50
pankso@10 51 genpkg_rules()
pankso@10 52 {
pankso@10792 53 cp -a $install/* $fs
pankso@722 54 chown -R root.root $fs
al@17261 55
pascal@23944 56 # A tiny bug fix
pascal@23944 57 sed 's|= "\$NEWVER|= "${NEWVER:-$VERSION}|;s|\$NEWMD5|${NEWMD5:-$OLDMD5}|' \
pascal@23944 58 -i $fs/usr/libexec/tazpkg/info
pankso@3952 59 # Default icon for mimetype (freedesktop standard compliant file
pankso@3952 60 # manager will diplay a tazpkg icon for SliTaz packages).
psychomaniak@17872 61 icons="$fs/usr/share/icons/hicolor/32x32/mimetypes"
psychomaniak@17872 62 mkdir -p $icons
psychomaniak@17872 63 ln -s ../apps/tazpkg.png $icons/application-x-tazpkg.png
pankso@10 64 }
gokhlayeh@8157 65
gokhlayeh@8157 66 post_install()
gokhlayeh@8157 67 {
pankso@10792 68 # Apply a fix to config file /etc/slitaz/slitaz.conf
pascal@23623 69 [ -f $1/etc/slitaz/slitaz.conf ] && \
pascal@23623 70 sed -i 's/LOCAL_STATE/LOCALSTATE/' $1/etc/slitaz/slitaz.conf
pascal@23910 71 grep -q ^Icon= $1/usr/share/applications/tazpkg-url.desktop ||
pascal@23910 72 echo "Icon=tazpkg" >> $1/usr/share/applications/tazpkg-url.desktop
al@17261 73
pankso@10792 74 # Make sure new config is present
pascal@23623 75 if ! grep -q ^NOTIFY_GEOM "$1/etc/slitaz/tazpkg.conf"; then
pascal@23623 76 cat >> "$1/etc/slitaz/tazpkg.conf" << "EOT"
pankso@9492 77 # The geometry of the desktop notification
pankso@9492 78 NOTIFY_GEOM="360x80-0+24"
pankso@9492 79
pankso@9492 80 EOT
pankso@9492 81 fi
al@18595 82 :
gokhlayeh@9379 83 }