diff options
author | Didier Raboud <odyx@debian.org> | 2017-06-19 08:38:07 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2017-06-19 08:38:07 +0200 |
commit | aedf3e93e811c6c9d504274172861d266e1c5c97 (patch) | |
tree | 95e525108c5b6bd2ea3fa689cf11bfe4a5b982a9 /scripts | |
parent | 7bd83d89975d166521a0b326b64b4cad80117750 (diff) |
New upstream version 5.2.13~pre1
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 4 | ||||
-rw-r--r-- | scripts/Makefile.in | 25 | ||||
-rwxr-xr-x | scripts/gversion | 131 | ||||
-rwxr-xr-x | scripts/gversion.in | 131 | ||||
-rwxr-xr-x | scripts/mkgitlog | 18 | ||||
-rw-r--r-- | scripts/mkgitlog.in | 18 |
6 files changed, 320 insertions, 7 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index d8c9402..af442ca 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -28,8 +28,10 @@ include $(top_srcdir)/scripts/global.mk EXTRA_DIST = \ autogen.sh \ global.mk \ - mkgitlog + mkgitlog \ + gversion +noinst_SCRIPTS=gversion ## Clean diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 196f15c..b21c76e 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -18,6 +18,7 @@ #export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main #export STP_DATA_PATH = $(top_srcdir)/src/xml + VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -83,9 +84,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/scripts/global.mk $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(srcdir)/mkgitlog.in compile \ - config.guess config.rpath config.sub depcomp install-sh \ - missing ylwrap ltmain.sh + $(srcdir)/Makefile.am $(srcdir)/mkgitlog.in \ + $(srcdir)/gversion.in compile config.guess config.rpath \ + config.sub depcomp install-sh missing ylwrap ltmain.sh subdir = scripts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ @@ -102,8 +103,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = mkgitlog +CONFIG_CLEAN_FILES = mkgitlog gversion CONFIG_CLEAN_VPATH_FILES = +SCRIPTS = $(noinst_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -139,9 +141,11 @@ BZIP2 = @BZIP2@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +COMPRESS = @COMPRESS@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSUF = @CSUF@ CUPS_CFLAGS = @CUPS_CFLAGS@ CUPS_CONFIG = @CUPS_CONFIG@ CUPS_LIBS = @CUPS_LIBS@ @@ -200,6 +204,7 @@ GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ GUTENPRINT_RELEASE_VERSION = @GUTENPRINT_RELEASE_VERSION@ GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ +GZIP = @GZIP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -225,6 +230,7 @@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ +LRZIP = @LRZIP@ LTALLOCA = @LTALLOCA@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ @@ -252,6 +258,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PKGROOT = @PKGROOT@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -260,6 +267,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ RELEASE_DATE = @RELEASE_DATE@ RM = @RM@ +RZIP = @RZIP@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -272,6 +280,7 @@ VERSION = @VERSION@ WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ +XZ = @XZ@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -347,8 +356,10 @@ GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la EXTRA_DIST = \ autogen.sh \ global.mk \ - mkgitlog + mkgitlog \ + gversion +noinst_SCRIPTS = gversion MAINTAINERCLEANFILES = \ Makefile.in \ mkgitlog @@ -389,6 +400,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): mkgitlog: $(top_builddir)/config.status $(srcdir)/mkgitlog.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +gversion: $(top_builddir)/config.status $(srcdir)/gversion.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo @@ -434,7 +447,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(SCRIPTS) installdirs: install: install-am install-exec: install-exec-am diff --git a/scripts/gversion b/scripts/gversion new file mode 100755 index 0000000..eda0dc0 --- /dev/null +++ b/scripts/gversion @@ -0,0 +1,131 @@ +#!/bin/sh + +# Parse git version into its separate components. +# +# Copyright (C) 2017 Robert Krawitz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +usage() { + echo "Usage: $cmd [info] [default] [version]" + echo " info can be empty, or one of major, minor, micro, extra, git" + echo " info can also be extra-git, core-version (major.minor)," + echo " base-version (major.minor.micro)," + echo " full-version (major.minor.micro[-extra]), or all" + echo " default is the default value if not in a git repository." + echo " version is the input version in lieu of git describe (for testing)" + exit 1 +} + +cmd="$0" + +if [ "$#" -gt 3 ] ; then + usage +fi + +root="/home/rlk/sandbox/gutenprint-5.2" + +if [ -z "$3" ] ; then + if [ -d "$root/.git" ] ; then + git describe --dirty --always --first-parent 2>/dev/null | sed 's/^[^0-9]*-//' > "$root/git-version-stamp" + fi + + if [ -f "$root/git-version-stamp" ] ; then + description=`cat "$root/git-version-stamp"` + else + description='(unknown)' + fi +else + description=$3 +fi + +# If we don't have git or this is not a repository, simply return the default value +if [ -z "$description" ] ; then + echo "$2" + exit 0 +fi + +get_major() { + echo "$1" | sed -e 's/[-_\.].*//' +} + +get_minor() { + echo "$1" | sed -e 's/^[0-9]*[-_\.]//' \ + -e 's/[-_\.].*//' +} + +get_micro() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.]//' \ + -e 's/[-_\.].*//' +} + +get_extra() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/-\([0-9]*-\|\)g[0-9a-zA-Z]*\(-dirty\|\)$//' \ + -e 's/^_/-/' +} + +get_git() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.][a-zA-Z][a-zA-Z]*[0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.]/-/' +} + +get_extra_git() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.]/-/' +} + +get_core_version() { + echo "$1" | sed -e 's/^\([0-9]*[-_\.][0-9]*\).*/\1/' \ + -e 's/[-_\.]/./g' +} + +get_base_version() { + echo "$1" | sed -e 's/^\([0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)\).*/\1/' \ + -e 's/[-_\.]/./g' +} + +get_full_version() { + echo "$1" | sed -e 's/-[0-9]*-g[0-9a-z]*\(-dirty\|\)$//' \ + -e 's/[-_\.]/=/g' \ + -e 's/=/./' \ + -e 's/=/./' \ + -e 's/=/-/' +} + +get_all() { + echo "$1" | sed -e 's/[-_\.]/=/g' \ + -e 's/=/./' \ + -e 's/=/./' \ + -e 's/=/-/g' +} + +case "$1" in + major) get_major "$description" ;; + minor) get_minor "$description" ;; + micro) get_micro "$description" ;; + extra) get_extra "$description" ;; + git) get_git "$description" ;; + extra-git) get_extra_git "$description" ;; + core-version) get_core_version "$description" ;; + base-version) get_base_version "$description" ;; + full-version) get_full_version "$description" ;; + ''|all) get_all "$description" ;; + *) usage ;; +esac + +exit 0 diff --git a/scripts/gversion.in b/scripts/gversion.in new file mode 100755 index 0000000..1b4512b --- /dev/null +++ b/scripts/gversion.in @@ -0,0 +1,131 @@ +#!/bin/sh + +# Parse git version into its separate components. +# +# Copyright (C) 2017 Robert Krawitz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +usage() { + echo "Usage: $cmd [info] [default] [version]" + echo " info can be empty, or one of major, minor, micro, extra, git" + echo " info can also be extra-git, core-version (major.minor)," + echo " base-version (major.minor.micro)," + echo " full-version (major.minor.micro[-extra]), or all" + echo " default is the default value if not in a git repository." + echo " version is the input version in lieu of git describe (for testing)" + exit 1 +} + +cmd="$0" + +if [ "$#" -gt 3 ] ; then + usage +fi + +root="@PKGROOT@" + +if [ -z "$3" ] ; then + if [ -d "$root/.git" ] ; then + git describe --dirty --always --first-parent 2>/dev/null | sed 's/^[^0-9]*-//' > "$root/git-version-stamp" + fi + + if [ -f "$root/git-version-stamp" ] ; then + description=`cat "$root/git-version-stamp"` + else + description='(unknown)' + fi +else + description=$3 +fi + +# If we don't have git or this is not a repository, simply return the default value +if [ -z "$description" ] ; then + echo "$2" + exit 0 +fi + +get_major() { + echo "$1" | sed -e 's/[-_\.].*//' +} + +get_minor() { + echo "$1" | sed -e 's/^[0-9]*[-_\.]//' \ + -e 's/[-_\.].*//' +} + +get_micro() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.]//' \ + -e 's/[-_\.].*//' +} + +get_extra() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/-\([0-9]*-\|\)g[0-9a-zA-Z]*\(-dirty\|\)$//' \ + -e 's/^_/-/' +} + +get_git() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.][a-zA-Z][a-zA-Z]*[0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.]/-/' +} + +get_extra_git() { + echo "$1" | sed -e 's/^[0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)//' \ + -e 's/^[-_\.]/-/' +} + +get_core_version() { + echo "$1" | sed -e 's/^\([0-9]*[-_\.][0-9]*\).*/\1/' \ + -e 's/[-_\.]/./g' +} + +get_base_version() { + echo "$1" | sed -e 's/^\([0-9]*[-_\.][0-9]*[-_\.][0-9]*\([a-zA-Z]\|\)\).*/\1/' \ + -e 's/[-_\.]/./g' +} + +get_full_version() { + echo "$1" | sed -e 's/-[0-9]*-g[0-9a-z]*\(-dirty\|\)$//' \ + -e 's/[-_\.]/=/g' \ + -e 's/=/./' \ + -e 's/=/./' \ + -e 's/=/-/' +} + +get_all() { + echo "$1" | sed -e 's/[-_\.]/=/g' \ + -e 's/=/./' \ + -e 's/=/./' \ + -e 's/=/-/g' +} + +case "$1" in + major) get_major "$description" ;; + minor) get_minor "$description" ;; + micro) get_micro "$description" ;; + extra) get_extra "$description" ;; + git) get_git "$description" ;; + extra-git) get_extra_git "$description" ;; + core-version) get_core_version "$description" ;; + base-version) get_base_version "$description" ;; + full-version) get_full_version "$description" ;; + ''|all) get_all "$description" ;; + *) usage ;; +esac + +exit 0 diff --git a/scripts/mkgitlog b/scripts/mkgitlog index 9ad22e5..27adf1c 100755 --- a/scripts/mkgitlog +++ b/scripts/mkgitlog @@ -1,5 +1,23 @@ #!/usr/bin/perl +# Generate Git history. +# +# Copyright 2016 Robert Krawitz (rlk@alum.mit.edu) +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + use Getopt::Long; use strict; diff --git a/scripts/mkgitlog.in b/scripts/mkgitlog.in index 5e135f4..719bfea 100644 --- a/scripts/mkgitlog.in +++ b/scripts/mkgitlog.in @@ -1,5 +1,23 @@ #!@PERL@ +# Generate Git history. +# +# Copyright 2016 Robert Krawitz (rlk@alum.mit.edu) +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + use Getopt::Long; use strict; |