From 136fabaa9c459ef20000ad6fe65d9255687ca3f0 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sat, 23 Mar 2019 10:47:26 +0100 Subject: Added a shell script to build Arch Linux packages. --- .gitignore | 1 + archlinux/PKGBUILD | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .gitignore create mode 100644 archlinux/PKGBUILD 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 + +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 + +} -- cgit v0.11.2-87-g4458