summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-18 01:48:16 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-18 01:48:16 +0100
commit4489045a68486a2641a09195ba98b023094a20fc (patch)
tree4bcbdd69a120a7685291c3f02d9d18534f7b0525 /vars
parent44046a5a791e742ef22b052b1fe2ca5e32748fe2 (diff)
downloadmidipix_build-4489045a68486a2641a09195ba98b023094a20fc.tar.bz2
midipix_build-4489045a68486a2641a09195ba98b023094a20fc.tar.xz
subr/check_updates.subr: split special-cased package subroutines into vars/check_updates.vars.
Diffstat (limited to 'vars')
-rw-r--r--vars/check_updates.vars104
1 files changed, 104 insertions, 0 deletions
diff --git a/vars/check_updates.vars b/vars/check_updates.vars
new file mode 100644
index 00000000..6342c5c5
--- /dev/null
+++ b/vars/check_updates.vars
@@ -0,0 +1,104 @@
+#
+# . ./build.vars and set -o errexit -o noglob are assumed.
+#
+
+pkg_infounzip_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_fname="${cu_url##*/}";
+ cu_fname_base="${cu_fname%%[0-9]*}";
+ cu_fname_ext="${cu_fname#${cu_fname_base}${cu_version}.}";
+ ;;
+ get_version)
+ if [ "${cu_fname#${cu_fname_base}}" != "${cu_fname}" ]\
+ && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then
+ cu_fname_version="${cu_fname%.${cu_fname_ext}}";
+ cu_fname_version="${cu_fname_version#*zip*}";
+ fi;
+ ;;
+ esac;
+};
+
+pkg_infozip_check_updates() {
+ pkg_infounzip_check_updates "${@}";
+};
+
+pkg_libgpg_error_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_url_index="${cu_url%/*}/";
+ cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\
+ sed -n '/href="[^"]\+"/s/^.*href="\([^"]\+\)".*$/\1/p')";
+ cu_fname_base="libgpg-error";
+ ;;
+ esac;
+};
+
+pkg_libpthread_stubs_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_fname_base="libpthread-stubs";
+ ;;
+ esac;
+};
+
+pkg_mksh_check_updates() {
+ case "${1}" in
+ get_version)
+ if [ "${cu_fname#${cu_fname_base}-}" != "${cu_fname}" ]\
+ && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then
+ cu_fname_version="${cu_fname%.${cu_fname_ext}}";
+ cu_fname_version="${cu_fname_version#*-R}";
+ fi;
+ ;;
+ version_fixup)
+ cu_version="${cu_version#R}";
+ ;;
+ esac;
+};
+
+pkg_rxvt_unicode_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_fname_base="rxvt-unicode";
+ ;;
+ esac;
+};
+
+pkg_the_silver_searcher_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_url_index="http://geoff.greer.fm/ag/";
+ cu_fnames="$(wget ${WGET_ARGS} -qO- ${cu_url_index} |\
+ sed -n '/href="[^"]\+"/{s/^.*href="\([^"]\+\)".*$/\1/;s/\/$//;p}')";
+ ;;
+ esac;
+};
+
+pkg_util_linux_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_fname_base="util-linux";
+ cu_url_index="https://www.kernel.org/pub/linux/utils/util-linux/";
+ cu_fnames="$(wget ${WGET_ARGS} -qO- ${cu_url_index} |\
+ sed -n '/href="[^"]\+"/{s/^.*href="\([^"]\+\)".*$/\1/;s/\/$//;p}')";
+ ;;
+ get_version)
+ if [ "${cu_fname#${cu_fname_base}-}" = "${cu_fname}" ]\
+ && [ "${cu_fname%.${cu_fname_ext}}" = "${cu_fname}" ]; then
+ cu_fname_version="${cu_fname%.${cu_fname_ext}}";
+ cu_fname_version="${cu_fname_version#v}";
+ fi;
+ ;;
+ esac;
+};
+
+pkg_xcb_proto_check_updates() {
+ case "${1}" in
+ get_fnames)
+ cu_fname_base="xcb-proto";
+ ;;
+ esac;
+};
+
+# vim:filetype=sh