wok annotate tazpkg/receipt @ rev 24983

Up xcursor-comix (0.9.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 08 16:45:21 2022 +0000 (2022-05-08)
parents b57d2cbc7c42
children 50a8a74fbda3
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 {
pascal@20656 40 sed -i 's|\. receipt|. ./receipt|' */*
pascal@17427 41 make && make DESTDIR=$DESTDIR VERSION=$VERSION install
pankso@6776 42 }
pankso@6776 43
pankso@10 44 genpkg_rules()
pankso@10 45 {
pankso@10792 46 cp -a $install/* $fs
pankso@722 47 chown -R root.root $fs
al@17261 48
pascal@23944 49 # A tiny bug fix
pascal@23944 50 sed 's|= "\$NEWVER|= "${NEWVER:-$VERSION}|;s|\$NEWMD5|${NEWMD5:-$OLDMD5}|' \
pascal@23944 51 -i $fs/usr/libexec/tazpkg/info
pankso@3952 52 # Default icon for mimetype (freedesktop standard compliant file
pankso@3952 53 # manager will diplay a tazpkg icon for SliTaz packages).
psychomaniak@17872 54 icons="$fs/usr/share/icons/hicolor/32x32/mimetypes"
psychomaniak@17872 55 mkdir -p $icons
psychomaniak@17872 56 ln -s ../apps/tazpkg.png $icons/application-x-tazpkg.png
pankso@10 57 }
gokhlayeh@8157 58
gokhlayeh@8157 59 post_install()
gokhlayeh@8157 60 {
pankso@10792 61 # Apply a fix to config file /etc/slitaz/slitaz.conf
pascal@23623 62 [ -f $1/etc/slitaz/slitaz.conf ] && \
pascal@23623 63 sed -i 's/LOCAL_STATE/LOCALSTATE/' $1/etc/slitaz/slitaz.conf
pascal@23910 64 grep -q ^Icon= $1/usr/share/applications/tazpkg-url.desktop ||
pascal@23910 65 echo "Icon=tazpkg" >> $1/usr/share/applications/tazpkg-url.desktop
al@17261 66
pankso@10792 67 # Make sure new config is present
pascal@23623 68 if ! grep -q ^NOTIFY_GEOM "$1/etc/slitaz/tazpkg.conf"; then
pascal@23623 69 cat >> "$1/etc/slitaz/tazpkg.conf" << "EOT"
pankso@9492 70 # The geometry of the desktop notification
pankso@9492 71 NOTIFY_GEOM="360x80-0+24"
pankso@9492 72
pankso@9492 73 EOT
pankso@9492 74 fi
al@18595 75 :
gokhlayeh@9379 76 }