archrelease: copy trunk to staging-x86_64
[arch-packages.git] / e2fsprogs / trunk / PKGBUILD
blobe2da9fbc9538c9cbae89f82b2e31fda4af5d1420
1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Contributor: judd <jvinet@zeroflux.org>
4 pkgbase=e2fsprogs
5 pkgname=('e2fsprogs' 'fuse2fs')
6 pkgver=1.47.0
7 pkgrel=1
8 pkgdesc='Ext2/3/4 filesystem utilities'
9 arch=('x86_64')
10 license=('GPL' 'LGPL' 'MIT')
11 url='http://e2fsprogs.sourceforge.net'
12 makedepends=('systemd' 'util-linux' 'fuse')
13 validpgpkeys=('3AB057B7E78D945C8C5591FBD36F769BC11804F0') # Theodore Ts'o <tytso@mit.edu>
14 source=("https://www.kernel.org/pub/linux/kernel/people/tytso/${pkgbase}/v${pkgver}/${pkgbase}-${pkgver}.tar."{xz,sign}
15         'MIT-LICENSE')
16 sha256sums=('144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db'
17             'SKIP'
18             'cc45386c1d71f438ad648fd7971e49e3074ad9dbacf9dd3a5b4cb61fd294ecbb')
21 prepare() {
22   cd "${srcdir}/${pkgbase}-${pkgver}"
24   # Remove unnecessary init.d directory
25   sed -i '/init\.d/s|^|#|' misc/Makefile.in
28 build() {
29   cd "${srcdir}/${pkgbase}-${pkgver}"
31   ./configure \
32       --prefix=/usr \
33       --with-root-prefix='' \
34       --libdir=/usr/lib \
35       --sbindir=/usr/bin \
36       --enable-elf-shlibs \
37       --disable-fsck \
38       --disable-uuidd \
39       --disable-libuuid \
40       --disable-libblkid
41   make
43   # regenerate locale files
44   find po/ -name '*.gmo' -delete
45   make -C po update-gmo
48 package_e2fsprogs() {
49   depends=('sh' 'util-linux-libs')
50   optdepends=('lvm2: for e2scrub'
51               'util-linux: for e2scrub'
52               'smtp-forwarder: for e2scrub_fail script')
53   provides=('libcom_err.so'
54             'libe2p.so'
55             'libext2fs.so'
56             'libss.so')
57   backup=('etc/mke2fs.conf'
58           'etc/e2scrub.conf')
60   unset MAKEFLAGS
62   cd "${srcdir}/${pkgbase}-${pkgver}"
64   make DESTDIR="${pkgdir}" install install-libs
66   sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et"
68   # remove references to build directory
69   sed -i -e 's#^DIR=.*#DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds"
70   sed -i -e 's#^DIR=.*#DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et"
72   # remove static libraries with a shared counterpart
73   rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a
75   # remove fuse2fs which will be packaged separately
76   rm "${pkgdir}"/usr/{bin/fuse2fs,share/man/man1/fuse2fs.1}
78   # install MIT license
79   install -D -m0644 "${srcdir}/MIT-LICENSE" \
80     "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE"
83 package_fuse2fs() {
84   pkgdesc='Ext2/3/4 filesystem driver for FUSE'
85   depends=('fuse' 'e2fsprogs')
87   cd "${srcdir}/${pkgbase}-${pkgver}"
89   install -D -m0755 'misc/fuse2fs' "${pkgdir}/usr/bin/fuse2fs"
90   install -D -m0644 'misc/fuse2fs.1' "${pkgdir}/usr/share/man/man1/fuse2fs.1"
91   mkdir -p "${pkgdir}"/usr/share/licenses
92   ln -s "${pkgbase}" "${pkgdir}/usr/share/licenses/${pkgname}"