# 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 }