summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-05-05 21:17:09 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-05-05 21:17:09 -0700
commit4f3ddc289919a80f00ce2fe7666a9c0637450663 (patch)
treea282f365a9b3cf2c70b0f1f7cd8b33dbf2e8496c
downloadlibretools-4f3ddc289919a80f00ce2fe7666a9c0637450663.tar.xz
Initial commit
-rw-r--r--PKGBUILD104
-rw-r--r--libretools.install52
2 files changed, 156 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..942523b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,104 @@
+# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
+# Maintainer (Parabola): Luke Shumaker <lukeshu@parabola.nu>
+# Contributor (Parabola): Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
+# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
+# Contributor (Parabola): Márcio Silva <coadde@hyperbola.info>
+
+# # I maintain this because:
+# Required for your-freedom
+# Parabola version uses non-standard pkgver
+
+pkgbase=libretools
+pkgname=(libretools librelib gitget)
+pkgdesc="Programs for Parabola development"
+url="https://git.parabola.nu/packages/libretools.git/"
+license=('GPL3' 'GPL2')
+
+pkgver=20181004
+source=(https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
+sha256sums=('2bdefd1803ba3e6cbd1eb955fad3de9ce8a4abfd23a0bd96a60772762df7b53b'
+ 'SKIP')
+validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker
+
+pkgrel=1
+arch=('any')
+makedepends=(ruby-ronn)
+checkdepends=(
+ bash-bats git
+ 'pacman>=5.1.1-1' 'pacman<5.2'
+ expac
+ openssh
+ rsync
+ tokyocabinet
+)
+
+build() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgbase-$pkgver"
+
+ SUDO_USER= make check TESTENVFLAGS='--no-network --no-sudo'
+}
+
+package_librelib() {
+ pkgdesc="The shell library portion of libretools"
+ license=(GPL2)
+ conflicts=('xbs')
+ optdepends=(
+ 'libretools: for libreblacklist/blacklist.sh'
+ 'wget: for libreblacklist/blacklist.sh'
+ )
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make install-librelib DESTDIR="$pkgdir"
+}
+
+package_gitget() {
+ pkgdesc="A simple to use downloader for git URLs"
+ license=(GPL2)
+ depends=("librelib=$pkgver" git)
+
+ provides=("libregit=$pkgver")
+ conflicts=("libregit")
+ replaces=("libregit")
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make install-gitget DESTDIR="$pkgdir"
+}
+
+package_libretools() {
+ backup=(etc/libretools.conf
+ etc/libretools.d/chroot.conf
+ etc/libretools.d/libredbdiff.conf
+ etc/libretools.d/librefetch.conf)
+ install=libretools.install
+ conflicts=(devtools libretools-mips64el)
+ replaces=(libretools-mips64el)
+
+ depends=(
+ "librelib=$pkgver"
+ "gitget=$pkgver" # `createworkdir`
+ 'pacman>=5.1.1-1' 'pacman<5.2'
+ arch-install-scripts # `mkarchroot` uses `pacstrap`
+ binutils # `libremakepkg` uses `makepkg` uses `strip`
+ expac # `libredbdiff`
+ fakeroot # `libremakepkg` uses `makepkg` uses `fakeroot`
+ make # `librefetch`
+ openssh # `librerelease`
+ rsync # `librerelease` and `makechrootpkg.sh`
+ 'systemd-tools>=234' # systemd-nspawn
+ tokyocabinet # `toru`
+ #namcap # Namcap is currently dissabled in libremakepkg :-(
+ subversion # `diff-unfree`
+ wget # `aur`, optdepend for librelib:`blacklist`
+ )
+ optdepends=(
+ 'qemu-user-static-binfmt: To build ARM packages from x86'
+ )
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make install-libretools DESTDIR="$pkgdir"
+}
diff --git a/libretools.install b/libretools.install
new file mode 100644
index 0000000..1c1e77b
--- /dev/null
+++ b/libretools.install
@@ -0,0 +1,52 @@
+#!/hint/bash
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ librefetch-install remove etc/makepkg.conf
+
+ # Now that we've reverted the change, automatically resolve
+ # makepkg.conf.pacnew, if we can.
+ if [[ -f etc/makepkg.conf && -f etc/makepkg.conf.pacnew ]]; then
+ # remove a trailing newline--a likely remnant of merging .pacnew with the librefetch bit
+ sed -i '${/^$/d}' etc/makepkg.conf
+
+ local stock_sha256sum stock_sha256sums sha256sum
+
+ # Let's go back 1 year (from 2018-08-26)
+ stock_sha256sums=(
+ # 5.0.2-2.parabola1 (2017-08-05) -- 5.0.2-2.parabola1.3 (2018-01-25)
+ 9dd688519366f12a4386fc890f76c48b3f9d6defef4c2ed0b33e813667612f19 # armv7h
+ 9e18db6242b8eb6ae6285a3ed7d975b3825ec3d25aecb1942c8ad4f98329398f # i686
+ 166c69b1adafd5374c50fbd2e85b4c1d292fdf7e07b4b0151e2ebfd5bfcb37bd # x86_64
+
+ # 5.0.2-2.parabola2 (2018-04-29) -- 5.0.2-3.parabola1 (2018-05-11)
+ 055e4425b293e505701e8fbe7bde3c9b22797ddcde061e0bafda126d956764c2 # armv7h
+ 616c87d521368de328e7d1498e819dd9b834601bca6077a99b3f0df73b6a6a7c # i686
+ 013a073181ef2f958e22b6fb4083744473291e338f0aa18823439efd49052332 # x86_64
+
+ # 5.1.0-1.parabola1 (2018-05-29)
+ 9e41020da19521777fc783123732ffef8e860ca377905896cbefe5a167f37410 # armv7h
+ 3b46c6a51af00d822892dd8103e2b2657e17ad1e1043b87ca8bed8b965d61fb1 # i686
+ 0bc5faf94f535504f12853ad5704a464ae80b6e9febd19a08070c66329a55135 # x86_64
+
+ # 5.1.0-2.parabola1 (2018-06-23) -- 5.1.1-1.parabola3 (2018-08-07)
+ 45cf2da36894a71c6054bf4d3b822e3d55816de69b2f4eae6ea2c055d7ac0f29 # armv7h
+ c3b0d878aeebff2cca9390deb730883c856922035f60b07fc683a06267dee050 # i686
+ 509568f5d12dd7e82a9e42a7e43b444d72b7cd49b9c8b7cc372025c0fcf3703b # x86_64
+
+ # 5.1.1-1.parabola4 (2018-08-26) --
+ b461585848d187b6bd6fcdc3774d46cf22574a5dc28ccd10421b0e824cd4916f # armv7h
+ 4bb5d938f7da8e7575bf85804eee4b752fe39ca92a4dd9407fe97d867289082c # i686
+ 6d94554dab59489ce6d7f60909e6828f0eb63435919f7890aec165965ea3187a # x86_64
+ )
+
+ read sha256sum _ < <(sha256sum etc/makepkg.conf)
+ for stock_sha256sum in "${stock_sha256sums[@]}"; do
+ if [[ $sha256sum = "$stock_sha256sum" ]]; then
+ mv -fTv etc/makepkg.conf.pacnew etc/makepkg.conf
+ break
+ fi
+ done
+ fi
+}