1 # Build recipe for e2fsprogs.
3 # Copyright (c) 2016-2021 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.gz
30 fetch=http://downloads.sourceforge.net/e2fsprogs/$tarname
33 Ext2 file system utilities.
35 The e2fsprogs package contains the utilities for handling the ext2 file
36 system. It also supports the ext3 and ext4 journaling file systems.
39 homepage=http://e2fsprogs.sourceforge.net
40 license="GPLv2+, LGPLv2, MIT-style licenses"
42 # Source documentation
43 docs="NOTICE README RELEASE-NOTES SUBMITTING-PATCHES"
44 docsdir="${docdir}/${program}-${version}"
48 unpack "${tardir}/$tarname"
52 # Set sane permissions
53 chmod -R u+w,go-w,a+rX-s .
55 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS -O3" LDFLAGS="$QILDFLAGS" \
57 --libdir=/usr/lib${libSuffix} \
61 --enable-symlink-install \
62 --enable-threads=posix \
68 --with-root-prefix=/usr \
69 --build="$(gcc -dumpmachine)"
73 make -j${jobs} MKDIR_P="mkdir -p" DESTDIR="$destdir" install
74 make -j${jobs} MKDIR_P="mkdir -p" DESTDIR="$destdir" install-libs
76 # Remove generated charset.alias and generated locale.alias
77 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias" \
78 "${destdir}/usr/share/locale/locale.alias"
80 # To handle config file(s)
81 touch "${destdir}/etc/.graft-config"
83 # Compress info documents deleting index file for the package
84 if test -d "${destdir}/$infodir"
86 rm -f "${destdir}/${infodir}/dir"
87 lzip -9 "${destdir}/${infodir}"/* || true
90 # Compress and link man pages (if needed)
91 if test -d "${destdir}/$mandir"
94 cd "${destdir}/$mandir"
95 find . -type f -exec lzip -9 {} +
96 find . -type l | while read -r file
98 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
105 mkdir -p "${destdir}${docsdir}"
106 cp -p $docs "${destdir}${docsdir}/"