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