summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in11
-rw-r--r--src/oh-autobuild.sh51
-rw-r--r--src/oh-autoclean.sh51
-rw-r--r--src/oh-autoconfigure.sh51
-rw-r--r--src/oh-autoinstall.sh54
-rw-r--r--src/oh-autotest.sh51
-rw-r--r--src/oh-fixperms.sh8
-rw-r--r--src/oh-installfiles.sh7
-rw-r--r--src/oh-strip.sh8
9 files changed, 272 insertions, 20 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index d620dca..1886b13 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -26,14 +26,14 @@ bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
localedir = @localedir@
-libopkbuild_1 = @libopkbuild_1@
+libopkhelper = @libopkhelper@
sh = @sh@
sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
s&@@PACKAGE_VERSION@@&$(package_version)&;\
s&@@LOCALEDIR@@&$(localedir)&;\
- s&@@LIBOPKBUILD_1@@&$(libopkbuild_1)&;\
+ s&@@LIBOPKHELPER@@&$(libopkhelper)&;\
s&@@SH@@&$(sh)&;
.SUFFIXES:
@@ -42,7 +42,12 @@ sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
SRCS = \
oh-installfiles.sh \
oh-strip.sh \
- oh-fixperms.sh
+ oh-fixperms.sh \
+ oh-autoconfigure.sh \
+ oh-autobuild.sh \
+ oh-autoclean.sh \
+ oh-autotest.sh \
+ oh-autoinstall.sh
OBJS = $(SRCS:.sh=)
distdir = ../$(package_name)-$(package_version)/src
diff --git a/src/oh-autobuild.sh b/src/oh-autobuild.sh
new file mode 100644
index 0000000..1bfe420
--- /dev/null
+++ b/src/oh-autobuild.sh
@@ -0,0 +1,51 @@
+#!@@SH@@
+#
+# opkhelper
+# src/oh-autobuild
+# Automatically build a package.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+. '@@LIBOPKHELPER@@/load.sm'
+
+oh_use buildsystem
+
+main()
+{
+ oh_init
+
+ while getopts 'S:B:' opt; do
+ case "${opt}" in
+ S)
+ oh_set_buildsystem_option 'build-system' "${OPTARG}"
+ ;;
+ B)
+ oh_set_buildsystem_option 'build-dir' "${OPTARG}"
+ ;;
+ ?)
+ ob_error "$(ob_get_msg 'bad_opt')"
+ exit 1
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ oh_buildsystems_init
+
+ oh_buildsystem_do 'build' "${@}"
+}
+
+main "${@}"
diff --git a/src/oh-autoclean.sh b/src/oh-autoclean.sh
new file mode 100644
index 0000000..e0488bd
--- /dev/null
+++ b/src/oh-autoclean.sh
@@ -0,0 +1,51 @@
+#!@@SH@@
+#
+# opkhelper
+# src/oh-autoclean
+# Automatically clean up a package's built files.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+. '@@LIBOPKHELPER@@/load.sm'
+
+oh_use buildsystem
+
+main()
+{
+ oh_init
+
+ while getopts 'S:B:' opt; do
+ case "${opt}" in
+ S)
+ oh_set_buildsystem_option 'build-system' "${OPTARG}"
+ ;;
+ B)
+ oh_set_buildsystem_option 'build-dir' "${OPTARG}"
+ ;;
+ ?)
+ ob_error "$(ob_get_msg 'bad_opt')"
+ exit 1
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ oh_buildsystems_init
+
+ oh_buildsystem_do 'clean' "${@}"
+}
+
+main "${@}"
diff --git a/src/oh-autoconfigure.sh b/src/oh-autoconfigure.sh
new file mode 100644
index 0000000..cef8e7f
--- /dev/null
+++ b/src/oh-autoconfigure.sh
@@ -0,0 +1,51 @@
+#!@@SH@@
+#
+# opkhelper
+# src/oh-autoconfigure
+# Automatically configure a package to be built.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+. '@@LIBOPKHELPER@@/load.sm'
+
+oh_use buildsystem
+
+main()
+{
+ oh_init
+
+ while getopts 'S:B:' opt; do
+ case "${opt}" in
+ S)
+ oh_set_buildsystem_option 'build-system' "${OPTARG}"
+ ;;
+ B)
+ oh_set_buildsystem_option 'build-dir' "${OPTARG}"
+ ;;
+ ?)
+ ob_error "$(ob_get_msg 'bad_opt')"
+ exit 1
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ oh_buildsystems_init
+
+ oh_buildsystem_do 'configure' "${@}"
+}
+
+main "${@}"
diff --git a/src/oh-autoinstall.sh b/src/oh-autoinstall.sh
new file mode 100644
index 0000000..b50174e
--- /dev/null
+++ b/src/oh-autoinstall.sh
@@ -0,0 +1,54 @@
+#!@@SH@@
+#
+# opkhelper
+# src/oh-autoinstall
+# Automatically install a package's data files.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+. '@@LIBOPKHELPER@@/load.sm'
+
+oh_use buildsystem
+
+main()
+{
+ oh_init
+
+ while getopts 'S:B:d:' opt; do
+ case "${opt}" in
+ S)
+ oh_set_buildsystem_option 'build-system' "${OPTARG}"
+ ;;
+ B)
+ oh_set_buildsystem_option 'build-dir' "${OPTARG}"
+ ;;
+ d)
+ oh_set_buildsystem_option 'destdir' "${OPTARG}"
+ ;;
+ ?)
+ ob_error "$(ob_get_msg 'bad_opt')"
+ exit 1
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ oh_buildsystems_init
+
+ oh_buildsystem_do 'install' "${@}"
+}
+
+main "${@}"
diff --git a/src/oh-autotest.sh b/src/oh-autotest.sh
new file mode 100644
index 0000000..7176c08
--- /dev/null
+++ b/src/oh-autotest.sh
@@ -0,0 +1,51 @@
+#!@@SH@@
+#
+# opkhelper
+# src/oh-autotest
+# Automatically run a package's test suites.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+. '@@LIBOPKHELPER@@/load.sm'
+
+oh_use buildsystem
+
+main()
+{
+ oh_init
+
+ while getopts 'S:B:' opt; do
+ case "${opt}" in
+ S)
+ oh_set_buildsystem_option 'build-system' "${OPTARG}"
+ ;;
+ B)
+ oh_set_buildsystem_option 'build-dir' "${OPTARG}"
+ ;;
+ ?)
+ ob_error "$(ob_get_msg 'bad_opt')"
+ exit 1
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ oh_buildsystems_init
+
+ oh_buildsystem_do 'test' "${@}"
+}
+
+main "${@}"
diff --git a/src/oh-fixperms.sh b/src/oh-fixperms.sh
index b9029df..d8f3886 100644
--- a/src/oh-fixperms.sh
+++ b/src/oh-fixperms.sh
@@ -19,17 +19,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. '@@LIBOPKBUILD_1@@/load.sm'
-
-ob_use locale
-ob_use output
+. '@@LIBOPKHELPER@@/load.sm'
main()
{
dir='dest'
- ob_set_locale_path '@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
- ob_set_text_domain 'opkhelper'
+ oh_init
while getopts 'd:' opt; do
case "${opt}" in
diff --git a/src/oh-installfiles.sh b/src/oh-installfiles.sh
index d77c89b..6288e6a 100644
--- a/src/oh-installfiles.sh
+++ b/src/oh-installfiles.sh
@@ -19,10 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. '@@LIBOPKBUILD_1@@/load.sm'
+. '@@LIBOPKHELPER@@/load.sm'
-ob_use locale
-ob_use output
ob_use package
files_ifs='
@@ -32,8 +30,7 @@ main()
{
dir='dest'
- ob_set_locale_path '@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
- ob_set_text_domain 'opkhelper'
+ oh_init
while getopts 'd:' opt; do
case "${opt}" in
diff --git a/src/oh-strip.sh b/src/oh-strip.sh
index bf328a5..96c4d3f 100644
--- a/src/oh-strip.sh
+++ b/src/oh-strip.sh
@@ -19,10 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. '@@LIBOPKBUILD_1@@/load.sm'
-
-ob_use locale
-ob_use output
+. '@@LIBOPKHELPER@@/load.sm'
CR='
'
@@ -32,8 +29,7 @@ main()
dir='dest'
keep_debug='false'
- ob_set_locale_path '@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
- ob_set_text_domain 'opkhelper'
+ oh_init
while getopts 'd:k' opt; do
case "${opt}" in