51 lines
1.7 KiB
Bash
51 lines
1.7 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=foremost
|
|
pkgver=1.5.7
|
|
_debver=$pkgver
|
|
_debrel=9.1
|
|
pkgrel=1
|
|
pkgdesc="A console program to recover files based on their headers, footers, and internal data structures"
|
|
arch=('i686' 'x86_64')
|
|
url='http://foremost.sourceforge.net/'
|
|
license=('GPL-2' 'Public-Domain')
|
|
depends=('glibc')
|
|
makedepends=('quilt')
|
|
backup=(etc/foremost.conf)
|
|
source=(https://foremost.sourceforge.net/pkg/$pkgname-$pkgver.tar.gz
|
|
https://deb.debian.org/debian/pool/main/f/foremost/foremost_$_debver-$_debrel.debian.tar.xz
|
|
fix-build.patch)
|
|
sha512sums=('8827c29d52496783be26374f3943eb26a154d842f34e50fb489f87b3a5045bf85f1e44d7d8d8b12b2355ba3fe4b06a0db979cc22c0f431593c5976001eb931ab'
|
|
'ca9685334d2444f996332fece0278d80976ecab159b71ae0bd09aba4497d8a7160d295d6ad536675304457ae02e71659e9cad1df5abe2dafa119090efea10207'
|
|
'2d60c6d47cfb017370becd07baea725826f321ed31227f063c751526704493c14632d67ffb7d8c9467a250cbe0fb266d7afdb233f5e4b374e24593b58465402a')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"/$pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
patch -Np1 -i ${srcdir}/fix-build.patch
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}"/$pkgname-$pkgver
|
|
make BIN="/usr/bin"
|
|
}
|
|
|
|
package () {
|
|
cd "${srcdir}"/$pkgname-$pkgver
|
|
|
|
install -d "${pkgdir}"/{etc,usr/bin,usr/share/man/man8,usr/share/licenses/foremost}
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# license
|
|
install -Dm644 debian/copyright -t "${pkgdir}"/usr/share/licenses/$pkgname
|
|
}
|