summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-03-05 12:27:43 (EST)
committer P. J. McDermott <pjm@nac.net>2014-03-05 12:27:43 (EST)
commit75ad374eb9d8a5cff65a281aa8ef29b7aaa0904f (patch)
tree567103669c7302e83532cf0983586eb944e2e0b5
parent96360165e6d98cf56e3aabb7c644e48a56d9770d (diff)
parent495eb104f847b15c405756540588ac2c8f3dcfff (diff)
Merge branch 'feature/opkbuild-helper-script'.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac25
-rw-r--r--opkhelper.sh1
4 files changed, 34 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 00b4298..1c665a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ lib/*.sm
lib/*/*.sm
locale/*.ms
man/*[^.]??
+opkhelper
*-*/
*-*.tar*
diff --git a/Makefile.am b/Makefile.am
index cc61010..d5760ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,17 +23,21 @@ include $(top_srcdir)/locale/local.mk
include $(top_srcdir)/archtab/local.mk
include $(top_srcdir)/tests/local.mk
+helper_sources = opkhelper.sh
+
bin_SCRIPTS = $(bin_sources:.sh=)
pkgdata_SCRIPTS = $(pkgdata_sources:.sh=.sm)
pkgdatabuildsystem_SCRIPTS = $(pkgdatabuildsystem_sources:.sh=.sm)
man1_MANS = $(man1_sources:.1in=.1)
locale_MESSAGES = $(locale_sources:.sh=.ms)
+helper_SCRIPTS = $(helper_sources:.sh=)
CLEANFILES = \
$(bin_SCRIPTS) \
$(pkgdata_SCRIPTS) \
$(pkgdatabuildsystem_SCRIPTS) \
$(man1_MANS) \
- $(locale_MESSAGES)
+ $(locale_MESSAGES) \
+ $(helper_SCRIPTS)
pkgdatabuildsystemdir = $(pkgdatadir)/buildsystem
archtabdir = $(pkgdatadir)/archtab
EXTRA_DIST = \
@@ -48,6 +52,7 @@ EXTRA_DIST = \
$(archtab_sources) \
$(tests) \
tests/testlib.sh \
+ $(helper_sources) \
scripts/changelog2news.sh
SUFFIXES = .sh .sm .1in .1 .ms
@@ -59,6 +64,7 @@ do_subst = sed \
-e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|[@]SH[@]|$(SH)|g' \
-e 's|[@]multiarch_libdir[@]|$(multiarch_libdir)|g' \
+ -e 's|[@]bindir[@]|$(bindir)|g' \
-e 's|[@]pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|[@]localedir[@]|$(localedir)|g' \
-e 's|[@]archtabdir[@]|$(archtabdir)|g'
diff --git a/configure.ac b/configure.ac
index 209256e..50c18f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,32 @@ AC_ARG_ENABLE(
]
)
+AC_ARG_WITH(
+ [opkbuild-helpers],
+ [AS_HELP_STRING([--with-opkbuild-helpers=PATH],
+ [specify directory to install opkbuild helper script])],
+ [
+ opt='opkbuild-helpers'
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-${opt} requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([${opt} is required])
+ ;;
+ *)
+ helperdir="${withval}"
+ ;;
+ esac
+ ],
+ [
+ helperdir='$(datadir)/opkbuild/helpers'
+ ]
+)
+
AC_SUBST([SH])
AC_SUBST([multiarch_libdir])
+AC_SUBST([helperdir])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT()
diff --git a/opkhelper.sh b/opkhelper.sh
new file mode 100644
index 0000000..b146196
--- /dev/null
+++ b/opkhelper.sh
@@ -0,0 +1 @@
+helper_path='@bindir@'