From c110049805e03798f335970c9543a567c58de4e7 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 27 Nov 2008 13:07:55 +0000 Subject: see CHANGELOG for details git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@543 04377dda-e619-0410-9926-eae83683ac58 --- trunk/doc/CHANGELOG | 6 +++++- trunk/mkbuild/generic.mkSlackBuild | 11 ++++++++++- trunk/mkbuild/model.mkbuild | 1 + trunk/mkbuild/perl.mkSlackBuild | 31 ++++++++++++++++++++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/trunk/doc/CHANGELOG b/trunk/doc/CHANGELOG index 8a457d5..08bae3f 100644 --- a/trunk/doc/CHANGELOG +++ b/trunk/doc/CHANGELOG @@ -21,9 +21,13 @@ simplepkg changelog - default configuration making createpkg repository integrated with simplaret - new repositories - mkbuild: some svn check routines extended for git + - perl.mkSlackBuild + - added sections copy_init_scripts and copy_config_files + - generic.mkSlackBuild and per.mkSlackBuild + - clean_builds now compliant with standard --cleanup behaviour + - new section slack-required - generic.mkSlackBuild: - config() on postinstall_script now accepting .dist and .sample config file extensions - - clean_builds now compliant with standard --cleanup behaviour - added git_source section - createpkg: - new options --status, --update and --commit to manage subversion repository diff --git a/trunk/mkbuild/generic.mkSlackBuild b/trunk/mkbuild/generic.mkSlackBuild index 2f1bf99..c889fde 100644 --- a/trunk/mkbuild/generic.mkSlackBuild +++ b/trunk/mkbuild/generic.mkSlackBuild @@ -383,6 +383,7 @@ done off # Add a post-installation script (doinst.sh) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR cat << EOSCRIPT > "$PKG/install/doinst.sh" config() { NEW="\$1" @@ -425,6 +426,14 @@ mkuser() { EOSCRIPT + off +# Copy slack-required +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +if [ -f "$CWD/slack-required" ]; then + cp $CWD/slack-required $PKG/install +fi + + off # Build the package cd "$PKG" @@ -433,7 +442,7 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO off # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi diff --git a/trunk/mkbuild/model.mkbuild b/trunk/mkbuild/model.mkbuild index 86f0c2d..a6ad022 100644 --- a/trunk/mkbuild/model.mkbuild +++ b/trunk/mkbuild/model.mkbuild @@ -148,6 +148,7 @@ off: copy_config_files on: slackdesc off: move_config_files off: postinstall_script +off: slack_required on: build_package on: clean_builds #<< End SlackBuild Sections diff --git a/trunk/mkbuild/perl.mkSlackBuild b/trunk/mkbuild/perl.mkSlackBuild index 130e2cd..165dd40 100644 --- a/trunk/mkbuild/perl.mkSlackBuild +++ b/trunk/mkbuild/perl.mkSlackBuild @@ -256,6 +256,27 @@ if [ -d "$PKG/$PREFIX/info" ]; then fi + off +# Copy init scripts +mkdir -p $PKG/etc/rc.d +cp $CWD/rc.* $PKG/etc/rc.d/ + + + off +# Copy config files +mkdir -p $PKG/etc +for conf in [[CONFIG FILES]]; do + mkdir -p $PKG/etc/`dirname $conf` + if [ -e "$CWD/conf/$conf" ]; then + cp -a $CWD/conf/$conf $PKG/etc/$conf + elif [ -e "$CWD/$conf" ]; then + cp -a $CWD/$conf $PKG/etc/$conf + elif [ -e "$conf" ]; then + cp -a $conf $PKG/etc/$conf + fi +done + + off # Install documentation DOCS="[[DOCUMENTATION FILES]]" @@ -304,6 +325,14 @@ config path/to/config_file.new EOSCRIPT + off +# Copy slack-required +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +if [ -f "$CWD/slack-required" ]; then + cp $CWD/slack-required $PKG/install +fi + + off # Build the package cd "$PKG" @@ -312,7 +341,7 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO off # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi -- cgit v1.2.3