jobcore/e2fsprogs/PKGBUILD

108 lines
3.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://git.disroot.org/joborun-pkg/jobcore/src/branch/main/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=e2fsprogs
pkgname=('e2fsprogs' 'fuse2fs')
pkgver=1.47.1
pkgrel=04
pkgdesc='Ext2/3/4 filesystem utilities w/o systemd'
url='http://e2fsprogs.sourceforge.net'
makedepends=('util-linux' 'fuse3' 'gettext')
#options=('debug')
optdepends=('lvm2: for e2scrub'
'util-linux: for e2scrub'
'smtp-forwarder: for e2scrub_fail script')
source=("https://www.kernel.org/pub/linux/kernel/people/tytso/${pkgbase}/v${pkgver}/${pkgbase}-${pkgver}.tar."{xz,sign}
'MIT-LICENSE')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# Remove unnecessary init.d directory
sed -i '/init\.d/s|^|#|' misc/Makefile.in
}
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
./configure \
--prefix='/usr' \
--with-root-prefix='' \
--libdir='/usr/lib' \
--libexecdir='/usr/lib' \
--sbindir='/usr/bin' \
--enable-elf-shlibs \
--disable-fsck \
--disable-uuidd \
--disable-libuuid \
--disable-libblkid
make
# regenerate locale files
find po/ -name '*.gmo' -delete
make -C po update-gmo
}
package_e2fsprogs() {
depends=('sh' 'util-linux-libs')
provides=('libcom_err.so'
'libe2p.so'
'libext2fs.so'
'libss.so')
backup=('etc/mke2fs.conf'
'etc/e2scrub.conf')
unset MAKEFLAGS
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}" install install-libs
sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et"
# remove references to build directory
sed -i -e 's#^DIR=.*#DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds"
sed -i -e 's#^DIR=.*#DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et"
# remove static libraries with a shared counterpart
rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a
# remove fuse2fs which will be packaged separately
rm "${pkgdir}"/usr/{bin/fuse2fs,share/man/man1/fuse2fs.1}
# install MIT license
install -D -m0644 "${srcdir}/MIT-LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE"
}
package_fuse2fs() {
pkgdesc='Ext2/3/4 filesystem driver for FUSE'
depends=('fuse3' 'e2fsprogs')
cd "${srcdir}/${pkgbase}-${pkgver}"
install -D -m0755 'misc/fuse2fs' "${pkgdir}/usr/bin/fuse2fs"
install -D -m0644 'misc/fuse2fs.1' "${pkgdir}/usr/share/man/man1/fuse2fs.1"
mkdir -p "${pkgdir}"/usr/share/licenses
ln -s "${pkgbase}" "${pkgdir}/usr/share/licenses/${pkgname}"
}
#---- arch license gpg-key & sha256sums ----
arch=('x86_64')
license=('GPL' 'LGPL' 'MIT')
validpgpkeys=('3AB057B7E78D945C8C5591FBD36F769BC11804F0') # Theodore Ts'o <tytso@mit.edu>
sha256sums=(5a33dc047fd47284bca4bb10c13cfe7896377ae3d01cb81a05d406025d99e0d1 # e2fsprogs-1.47.1.tar.xz
f55da3aaac88bc916a61a158a3cbd3ec17bcf50e82fccf38d791e5ac2c50faee # e2fsprogs-1.47.1.tar.sign
cc45386c1d71f438ad648fd7971e49e3074ad9dbacf9dd3a5b4cb61fd294ecbb) # MIT-LICENSE
## 5d519767349eecdb8875e0a7c58faaa8eb807fc9726acc88f5b53ef447a489dc e2fsprogs-1.47.1-04-x86_64.pkg.tar.lz
## e3615e6e282e270964d64796ffc0e2f367202f18dbd32c978b398eb1b138e077 fuse2fs-1.47.1-04-x86_64.pkg.tar.lz