updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / pkgtools-git / pkgtools.install
blobbcbf2f85c8dc4d22a15cd28d7e69c557e16a65b1
1 _MSG_UPDATE=" - Make sure to run pkgfile --update before use"
2 _MSG_CRON=" - An entry has been placed in /etc/cron.daily to run pkgfile --update
3    If you do not want this functionality, set UPDATE_CRON=0 in /etc/pkgtools/pkgfile.conf"
4 _MSG_HOOK=" - pkgfile includes a \"command not found\" hook for both zsh and bash.
5    This will automatically run pkgfile whenever you run
6    a command which the shell cannot find. If you want
7    this functionality, set CMD_SEARCH_ENABLED to 1 in
8    /etc/pkgtools/pkgfile.conf (or per-user by copying
9    that file to \${XDG_CONFIG_HOME}/pkgtools/pkgfile.conf), then
10    in your current shell run:
11      source /etc/profile"
13 is_update_from() {
14   res="`vercmp $1 $2`"
15   case $res in
16     '-1'|'0') return 0;;
17     '1') return 1;;
18   esac
21 ## arg 1:  the new package version
22 post_install() {
23   echo "$_MSG_UPDATE"
24   echo "$_MSG_HOOK"
25   echo "$_MSG_CRON"
28 ## arg 1:  the new package version
29 ## arg 2:  the old package version
30 post_upgrade() {
31   if is_update_from $2 11-1; then
32     echo " - All bugs related to pkgfile -b should be fixed in this update."
33   fi
34   if is_update_from $2 12-1; then
35     echo " - NOTE: pkgtools' \"command not found\" hook configuration has changed."
36     echo "   Please remove any old symlinks relating to it."
37     echo "$_MSG_HOOK"
38   fi
39   if is_update_from $2 15-1; then
40     echo " - pkgtools now uses \$XDG_CONFIG_HOME for all user-specific configuration."
41     echo "   run «mv ~/.pkgtools \"\$XDG_CONFIG_HOME/pkgtools\"»"
42   fi
43   if is_update_from $2 18-1; then
44     echo " - newpkg has been rewritten to be completely modular. See here for more info: http://github.com/Daenyth/pkgtools/commit/2d37197"
45   fi
46   if is_update_from $2 19-1; then
47     echo " ! This version contains an important bugfix for pkgfile. Previously, package updates would cause the pkgfile --update cron job to"
48     echo "   regain +x mode, causing updates to run even when manually disabled. This version disables the cronjob by setting UPDATE_CRON=0"
49     echo "   in /etc/pkgtools/pkgfile.conf"
50     echo " - This version of pkgtools contains a new tool called 'maintpkg'"
51     echo "   It sets the Maintainer in a PKGBUILD to your PACKAGER while preserving old Contributors"
52   fi
53   if is_update_from $2 22-1; then
54     echo " - This is the largest release in a long time. This updates all python scripts to py3k."
55     echo " - This version of pkgtools includes a new tool called gem2arch, for automating ruby gem packaging"
56   fi
59 ## arg 1:  the old package version
60 post_remove() {
61   cat << _EOM
62  - You may want to clean /var/cache/pkgtools/lists
63 _EOM
66 # vim:set ts=2 sw=2 et filetype=sh: