]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
added Makefile and removed simplepkg.SlackBuild
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 8 May 2008 22:35:39 +0000 (22:35 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 8 May 2008 22:35:39 +0000 (22:35 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@508 04377dda-e619-0410-9926-eae83683ac58

trunk/Makefile [new file with mode: 0644]
trunk/doc/CHANGELOG
trunk/simplepkg.SlackBuild [deleted file]

diff --git a/trunk/Makefile b/trunk/Makefile
new file mode 100644 (file)
index 0000000..d83db5a
--- /dev/null
@@ -0,0 +1,77 @@
+#
+#  Simplepkg Makefile by Silvio Rhatto (rhatto at riseup.net).
+#
+#  This Makefile 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 any later version.
+#
+#  This SlackBuild 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
+#
+
+VERSION = 0.6pre27
+BUILD = 1rha
+PREFIX = /usr
+INSTALL = /usr/bin/install
+
+clean:
+       rm -f *~ # clean local backups
+
+install_lib:
+       $(INSTALL) -D --mode=0644 lib/common.sh $(DESTDIR)/$(PREFIX)/libexec/simplepkg/common.sh
+
+install_bin:
+       $(INSTALL) -D --mode=0755 src/simplaret $(DESTDIR)/$(PREFIX)/bin/simplaret
+       $(INSTALL) -D --mode=0755 src/repos $(DESTDIR)/$(PREFIX)/bin/repos
+       $(INSTALL) -D --mode=0755 src/lspkg $(DESTDIR)/$(PREFIX)/bin/lspkg
+       $(INSTALL) -D --mode=0755 src/mkbuild $(DESTDIR)/$(PREFIX)/bin/mkbuild
+       $(INSTALL) -D --mode=0755 src/mkpatch $(DESTDIR)/$(PREFIX)/bin/mkpatch
+
+install_sbin:
+       $(INSTALL) -D --mode=0755 src/mkjail $(DESTDIR)/$(PREFIX)/sbin/mkjail
+       $(INSTALL) -D --mode=0755 src/templatepkg $(DESTDIR)/$(PREFIX)/sbin/templatepkg
+       $(INSTALL) -D --mode=0755 src/jail-update $(DESTDIR)/$(PREFIX)/sbin/jail-update
+       $(INSTALL) -D --mode=0755 src/jail-commit $(DESTDIR)/$(PREFIX)/sbin/jail-commit
+       $(INSTALL) -D --mode=0755 src/rebuildpkg $(DESTDIR)/$(PREFIX)/sbin/rebuildpkg
+       $(INSTALL) -D --mode=0755 src/createpkg $(DESTDIR)/$(PREFIX)/sbin/createpkg
+       $(INSTALL) -D --mode=0755 src/simpletrack $(DESTDIR)/$(PREFIX)/sbin/simpletrack
+       @cd $(DESTDIR)/usr/sbin && ln -sf jail-upgrade vserver-upgrade
+
+install_doc:
+       $(INSTALL) -D --mode=0644 doc/COPYING $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/COPYING
+       $(INSTALL) -D --mode=0644 doc/TODO $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/TODO
+       $(INSTALL) -D --mode=0644 doc/CHANGELOG $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/CHANGELOG
+       $(INSTALL) -D --mode=0644 doc/README $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/README
+       $(INSTALL) -D --mode=0644 doc/README.pt_BR $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/README.pt_BR
+       $(INSTALL) -D --mode=0644 doc/README.simplaret $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/README.simplaret
+       $(INSTALL) -D --mode=0644 doc/README.simplaret.pt_BR $(DESTDIR)/$(PREFIX)/doc/simplepkg-$(VERSION)/README.simplaret.pt_BR
+
+install_config:
+       $(INSTALL) -D --mode=0644 conf/simplepkg.conf.new $(DESTDIR)/etc/simplepkg/simplepkg.conf.new
+       $(INSTALL) -D --mode=0644 conf/repos.conf.new $(DESTDIR)/etc/simplepkg/repos.conf.new
+       @mkdir -p $(DESTDIR)/etc/simplepkg/defaults/mkbuild/
+       @cp mkbuild/* $(DESTDIR)/etc/simplepkg/defaults/mkbuild/
+
+install_defaults:
+       @mkdir -p $(DESTDIR)/etc/simplepkg/{defaults/mkbuild,templates}
+       @rsync -av --exclude=.svn templates/* $(DESTDIR)/etc/simplepkg/defaults/templates/
+       @chmod +x $(DESTDIR)/etc/simplepkg/defaults/templates/vserver/vserver.s/*.sh
+       @chmod +x $(DESTDIR)/etc/simplepkg/defaults/templates/vserver-legacy/vserver-legacy.s/*.sh
+
+install: clean
+       @make install_lib install_bin install_sbin install_doc install_config install_defaults
+       $(INSTALL) -D --mode=0644 install/slack-desc $(DESTDIR)/install/slack-desc
+       $(INSTALL) -D --mode=0755 install/doinst.sh $(DESTDIR)/install/doinst.sh
+
+package:
+       echo "Remember to run this option as root!"
+       @rm -rf /tmp/package-simplepkg
+       @mkdir -p /tmp/package-simplepkg
+       @make DESTDIR=/tmp/package_simplepkg install
+       @cd /tmp/package-simplepkg && makepkg -c y -l y /tmp/simplepkg-$(VERSION)-noarch-$(BUILD).tgz && cd - && rm -rf /tmp/package-simplepkg
+       echo "Remember to run this option as root!"
index 1605f38ee86c1f09abe91017c363b5f5f4997747..6b24ccf2602f775850593741ba22d3bf18cf0881 100644 (file)
@@ -3,6 +3,8 @@ simplepkg changelog
 
 0.6pre27
 ========
+
+    - using Makefile instead of simplepkg.SlackBuild
     - createpkg 1.1.12:
       - change indentation do two spaces;
       - add option --debug|-d to debug SlackBuilds scripts;
@@ -16,10 +18,6 @@ simplepkg changelog
         *.old, and *.tmp to slackbuild repository, in commit_slackbuild
         function;
       - add EXIT_CODE to output status from mkbuild;
-    - simplepkg.SlackBuild:
-      - remove all *~ files to local build
-      - save simplepkg-....tgz in /tmp
-      - ...
 
 0.6pre26
 ========
diff --git a/trunk/simplepkg.SlackBuild b/trunk/simplepkg.SlackBuild
deleted file mode 100755 (executable)
index a854be0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-#
-# SlackBuild script for simplepkg
-#
-#  This SlackBuild 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 any later version.
-#
-#  This SlackBuild 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
-#
-
-PACKAGE="simplepkg"
-PACK_DIR="package-$PACKAGE"
-BUILD=${BUILD:=1rha}
-VERSION="0.6pre27"
-ARCH="noarch"
-LIBEXEC="/usr/libexec/$PACKAGE"
-BINDIR="/usr/bin"
-BINARY_LIST="simplaret repos lspkg mkbuild mkpatch"
-SBINDIR="/usr/sbin"
-SBINARY_LIST="mkjail templatepkg jail-update jail-commit metapkg rebuildpkg createpkg exec-slackbuild simpletrack"
-LIB_LIST="common.sh"
-DOC_DIR="/usr/doc"
-DOC_LIST="COPYING TODO CHANGELOG README README.pt_BR README.simplaret README.simplaret.pt_BR"
-
-find . -name *~ | xargs rm # clean local backups
-
-rm -rf $PACK_DIR
-mkdir -p $PACK_DIR/install
-cp install/slack-desc $PACK_DIR/install
-cp install/doinst.sh $PACK_DIR/install
-
-mkdir -p $PACK_DIR/$SBINDIR
-for binary in $SBINARY_LIST; do
-  if [ -f "src/$binary" ]; then
-    cp src/$binary $PACK_DIR/$SBINDIR
-    chmod +x $PACK_DIR/$SBINDIR/$binary
-  fi
-done
-
-mkdir -p $PACK_DIR/$BINDIR
-for binary in $BINARY_LIST; do
-  cp src/$binary $PACK_DIR/$BINDIR/
-  chmod +x $PACK_DIR/$BINDIR/$binary
-done
-
-mkdir -p $PACK_DIR/$LIBEXEC
-for lib in $LIB_LIST; do
-  cp lib/$lib $PACK_DIR/$LIBEXEC/
-done
-
-rm -rf $PACK_DIR/$DOC_DIR
-mkdir -p $PACK_DIR/$DOC_DIR/$PACKAGE-$VERSION
-for file in $DOC_LIST; do
- cp doc/$file $PACK_DIR/$DOC_DIR/$PACKAGE-$VERSION/
-done
-
-mkdir -p $PACK_DIR/etc/$PACKAGE/{defaults/mkbuild,templates}
-rsync -av --exclude=.svn templates/* $PACK_DIR/etc/$PACKAGE/defaults/templates/
-chmod +x $PACK_DIR/etc/$PACKAGE/defaults/templates/vserver/vserver.s/*.sh
-chmod +x $PACK_DIR/etc/$PACKAGE/defaults/templates/vserver-legacy/vserver-legacy.s/*.sh
-cp conf/simplepkg.conf.new $PACK_DIR/etc/$PACKAGE/
-cp conf/repos.conf.new $PACK_DIR/etc/$PACKAGE/
-cp mkbuild/* $PACK_DIR/etc/$PACKAGE/defaults/mkbuild/
-
-if [ -f "$PACK_DIR/usr/sbin/jail-upgrade" ]; then
-  cd $PACK_DIR/usr/sbin && ln -s jail-upgrade vserver-upgrade
-  cd -
-fi
-
-cd $PACK_DIR
-chown -R root.root *
-
-makepkg -c y -l y /tmp/simplepkg-$VERSION-$ARCH-$BUILD.tgz
-cd ..
-
-if [ "$CLEANUP" != "no" ]; then
-  rm -rf $PACK_DIR
-fi