summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-11-03 21:01:45 +0100
committerGravatar waker <wakeroid@gmail.com>2010-11-03 21:01:45 +0100
commitee9a5745186ccc825878627644334f552885bcc1 (patch)
tree38625efed79f4750b68a200f0e95e63cf723a30a
parentb3fdc2702ae846ae241ce306df0e0ce2f26e82af (diff)
updated portable packager
-rw-r--r--.gitignore7
-rwxr-xr-xportable_build.sh7
-rwxr-xr-xportable_package.sh21
-rw-r--r--tools/apbuild/Makefile55
4 files changed, 74 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index a77d71f1..c5d3a157 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,11 @@
.exec
aclocal.m4
configure
-Makefile
+plugins/*/Makefile
+intl/Makefile
+icons/Makefile
+pixmaps/Makefile
+po/Makefile
Makefile.in
config.h
config.h.in
@@ -45,3 +49,4 @@ POTFILES
stamp-it
po/Makevars.template
*.so
+tools/pluginfo/pluginfo
diff --git a/portable_build.sh b/portable_build.sh
index 0d4716e2..b9e2b4ca 100755
--- a/portable_build.sh
+++ b/portable_build.sh
@@ -1,11 +1,14 @@
#!/bin/sh
VERSION=`cat PORTABLE_VERSION | perl -ne 'chomp and print'`
-CC=$HOME/bin/autopackage/apbuild/apgcc CXX=$HOME/bin/autopackage/apbuild/apgcc ./configure --enable-portable --disable-pulse --enable-maintainer-mode --disable-nls
+CC=tools/apbuild/apgcc CXX=tools/apbuild/apgcc ./configure --enable-portable --disable-pulse --enable-maintainer-mode --disable-nls
sed -i 's/-lstdc++ -lm -lgcc_s -lc -lgcc_s/-lm -lc/g' libtool
-make clean
+#make clean
make -j9
#./portable_postbuild.sh
+cd tools/pluginfo
+make
+cd ../../
diff --git a/portable_package.sh b/portable_package.sh
index f7573a54..c201b469 100755
--- a/portable_package.sh
+++ b/portable_package.sh
@@ -43,22 +43,17 @@ cd $PLUGDIR
plugtable=../../../deadbeef-web/web/plugins-autogen.mkd
echo "<table><tr><th>Name</th><th>Version</th><th>Size</th><th>For Deadbeef</th><th>Description</th><th>Author(s)</th></tr>" >$plugtable
+PLUGINFO=../../tools/pluginfo/pluginfo
+
for i in *.so ; do
plugname=`basename $i .so`
+
version=""
- for fn in ../../plugins/$plugname/*.c* ; do
- VMAJOR=`cat $fn 2>/dev/null | grep -m 1 version_major | perl -pe 's/.*version_major[^\d]+([\d]+).*$/$1/' | perl -ne 'chomp and print'`
- VMINOR=`cat $fn 2>/dev/null | grep -m 1 version_minor | perl -pe 's/.*version_minor[^\d]+([\d]+).*$/$1/' | perl -ne 'chomp and print'`
- author=`cat $fn 2>/dev/null | grep -m 1 '\.author = ' | perl -pe 's/.*author = "(.*)".*/$1/' | perl -ne 'chomp and print'`
- email=`cat $fn 2>/dev/null | grep -m 1 '\.email = ' | perl -pe 's/.*\.email = "(.*)".*/$1/' | perl -ne 'chomp and print'`
- descr=`cat $fn 2>/dev/null | grep -m 1 '\.descr = ' | perl -pe 's/.*\.descr = "(.*)".*/$1/' | perl -ne 'chomp and print'`
- if [[ -n $VMAJOR ]] && [[ -n $VMINOR ]]; then
- version="$VMAJOR.$VMINOR"
- break
- fi
- done
+ $PLUGINFO ./$i >./temp.sh
+ source ./temp.sh
+ rm ./temp.sh
if [[ -n $version ]]; then
- echo "$plugname version $VMAJOR.$VMINOR"
+ echo "$plugname version $version"
else
echo "$plugname version not found"
fi
@@ -67,7 +62,7 @@ for i in *.so ; do
fsize=$(stat -c%s "$fname")
# add some markdown
- echo "<tr><td><a href="http://sourceforge.net/projects/deadbeef/files/deadbeef-$VERSION-portable-$plugname-$version.tar.bz2/download">$plugname</a></td><td>$version</td><td>$fsize</td><td>$VERSION</td><td>$descr</td><td>$author ($email)</td></tr>" >>$plugtable
+ echo "<tr><td><a href="http://sourceforge.net/projects/deadbeef/files/deadbeef-$VERSION-portable-$name-$version.tar.bz2/download">$name ($plugname)</a></td><td>$version</td><td>$fsize</td><td>$VERSION</td><td>$descr</td><td>$author ($email, $website)</td></tr>" >>$plugtable
done
echo "</table>" >>$plugtable
cd ../../
diff --git a/tools/apbuild/Makefile b/tools/apbuild/Makefile
new file mode 100644
index 00000000..0b0441b4
--- /dev/null
+++ b/tools/apbuild/Makefile
@@ -0,0 +1,55 @@
+.PHONY: all install uninstall
+
+PREFIX:=$(shell test x"`id -u`" = "x0" && if test -f /usr/bin/apgcc; then echo /usr; else echo /usr/local; fi || echo ~/.local)
+BINDIR:=$(PREFIX)/bin
+PERLDIR:=$(PREFIX)/share/apbuild
+INCLUDEDIR:=$(PREFIX)/include/apbuild
+ACLOCALDIR:=$(PREFIX)/share/aclocal
+
+PACKAGE=apbuild
+# Don't forget to bump the version in apgcc too.
+VERSION=2.0.9
+
+PROGS:=apgcc apg++ relaytool scandeps make-icons
+
+all:
+ @echo No compilation is required. To install, type 'make install'.
+ @echo "(Current prefix=$(PREFIX))"
+
+install:
+ mkdir -p $(BINDIR)
+ cp $(PROGS) $(BINDIR)
+ chmod +x $(BINDIR)/apgcc $(BINDIR)/apg++ $(BINDIR)/scandeps $(BINDIR)/make-icons $(BINDIR)/relaytool
+ mkdir -p $(PERLDIR)/Apbuild
+ cp Apbuild/*.pm $(PERLDIR)/Apbuild/
+ mkdir -p $(INCLUDEDIR)
+ cp ctype.h apsymbols.h $(INCLUDEDIR)
+ mkdir -p $(ACLOCALDIR)
+ cp relaytool.m4 $(ACLOCALDIR)
+ echo >> $(INCLUDEDIR)/apsymbols.h
+ echo "/* apbuild version" $(VERSION) "*/" >> $(INCLUDEDIR)/apsymbols.h
+ @echo --------------
+ @echo "Installation complete. Please read README for usage."
+
+uninstall:
+ rm -f $(addprefix $(BINDIR)/, $(PROGS))
+ rm -f $(PERLDIR)/Apbuild/*.pm
+ rmdir $(PERLDIR)/Apbuild $(PERLDIR)
+ rm -f $(INCLUDEDIR)/ctype.h
+ rm -f $(INCLUDEDIR)/apsymbols.h
+ rm -f $(ACLOCALDIR)/relaytool.m4
+
+distdir:
+ rm -rf $(PACKAGE)-$(VERSION)
+ mkdir $(PACKAGE)-$(VERSION)
+ cp -R BINARY-PORTABILITY-NOTES Makefile apsymbols.h ctype.h README $(PROGS) buildlist relaytool.m4 $(PACKAGE)-$(VERSION)/
+ mkdir $(PACKAGE)-$(VERSION)/test-app
+ mkdir $(PACKAGE)-$(VERSION)/Apbuild
+ cp Apbuild/*.pm $(PACKAGE)-$(VERSION)/Apbuild/
+ cp test-app/randomapp1.c $(PACKAGE)-$(VERSION)/test-app/
+
+dist: distdir
+ rm -f $(PACKAGE)-$(VERSION).tar.gz
+ tar -cf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
+ gzip --best $(PACKAGE)-$(VERSION).tar
+ rm -rf $(PACKAGE)-$(VERSION)