summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-03-23 09:47:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-03-23 09:47:26 (GMT)
commit136fabaa9c459ef20000ad6fe65d9255687ca3f0 (patch)
tree08c6aef26c739d802626f9f0482c5282d72372c8
parentb8a78a6262e60d825334b6c81dd2da24b202e18f (diff)
Added a shell script to build Arch Linux packages.
-rw-r--r--.gitignore1
-rw-r--r--archlinux/PKGBUILD99
2 files changed, 100 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~
diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD
new file mode 100644
index 0000000..e61c450
--- /dev/null
+++ b/archlinux/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Cyrille Bagard <nocbos@gmail.com>
+
+pkgname=chrysalide
+pkgver=r0
+pkgrel=1
+
+pkgdesc="Reverse Engineering Factory focused on embedded systems"
+url='https://www.chrysalide.re/'
+license=('GPL3')
+
+arch=("$CARCH")
+
+# base-devel: autoconf automake bison flex gettext libtool
+makedepends=('git')
+
+depends=('gtk3' 'libxml2' 'python' 'pygobject-devel' 'libarchive' 'sqlite' 'openssl')
+
+source=('git+http://git.0xdeadc0de.fr/chrysalide.git')
+md5sums=('SKIP')
+
+
+pkgver() {
+
+ cd "$pkgname"
+
+ printf "r%s" "$(( $(git rev-list --count HEAD) + 4))"
+
+}
+
+
+prepare() {
+
+ # XXX can not be optional and used as intermediate value at the same time!
+
+ sed -i 's#result = false#//result = false#' "$pkgname/tools/d2c/conv/manager.c"
+
+ # /usr/include/string.h includes /usr/include/strings.h:
+
+ # In file included from /usr/include/string.h:431,
+ # from /usr/include/glib-2.0/glib/gtestutils.h:30,
+ # from /usr/include/glib-2.0/glib.h:85,
+ # from /usr/include/glib-2.0/gobject/gbinding.h:28,
+ # from /usr/include/glib-2.0/glib-object.h:23,
+ # from ../editem.h:29,
+ # from panel.h:32,
+ # from panel.c:25:
+
+ sed -i '1i\DEFAULT_INCLUDES = -I$(top_builddir)' "$pkgname/src/gui/panels/Makefile.am"
+
+ sed -i '1i\DEFAULT_INCLUDES = -I$(top_builddir)' "$pkgname/plugins/elf/Makefile.am"
+
+}
+
+
+build() {
+
+ cd "$pkgname"
+
+ ./tools/ipf/init_potfiles.sh
+
+ autopoint
+
+ sed -i 's/po\/Makefile.in \(po\/Makefile.in *\)*/po\/Makefile.in /' configure.ac
+ sed -i 's/EXTRA_DIST.*$/EXTRA_DIST = config.rpath ChangeLog/' Makefile.am
+
+ rm po/Makevars.template
+ cp /usr/share/gettext/gettext.h .
+
+ # Create a timestamp mark
+ echo "timestamp" > stamp-h.in
+
+ # As some Makefiles expect an external fragment built dynamically, ensure these files exist
+ touch plugins/arm/v7/opcodes/gencode.mk
+ touch plugins/dalvik/v35/opcodes/gencode.mk
+
+ touch ChangeLog
+
+ # Run the GNU tools
+ libtoolize --force
+ aclocal -Im4
+ autoheader
+ automake --add-missing --copy
+ autoconf
+
+ # Define the way the program will be built
+ ./configure -prefix=/usr --enable-silent-rules --disable-rpath --without-local-resources
+
+ make -j$(nproc)
+
+}
+
+
+package() {
+
+ cd "$pkgname"
+
+ make DESTDIR="$pkgdir" install
+
+}