]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - e2fsprogs/e2fsprogs.nm
Move all packages to root.
[ipfire-3.x.git] / e2fsprogs / e2fsprogs.nm
diff --git a/e2fsprogs/e2fsprogs.nm b/e2fsprogs/e2fsprogs.nm
new file mode 100644 (file)
index 0000000..1fce087
--- /dev/null
@@ -0,0 +1,86 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = e2fsprogs
+version    = 1.41.11
+release    = 1
+
+groups     = System/Filesystems
+url        = http://e2fsprogs.sourceforge.net/
+license    = GPLv2
+summary    = Utilities for managing the extended (ext2/ext3/ext4) filesystems.
+
+description
+       The e2fsprogs package contains a number of utilities for creating, \
+       checking, modifying, and correcting any inconsistencies in second \
+       and third extended (ext2/ext3) filesystems.
+end
+
+source_dl  =
+
+build
+       requires
+               libblkid-devel
+               libselinux-devel
+               libsepol-devel
+               libuuid-devel
+       end
+
+       prepare_cmds
+               mkdir -pv %{DIR_APP}/build
+
+               # Fix DT_TEXTREL in e2fsprogs libraries. --disable-shared and
+               # --with-pic are not options in E2fsprogs:
+               find lib/ -name Makefile.in -exec sed -i "s/\%{ALL_CFLAGS}/& -fPIC/" {} \;
+
+               # At run time libblkid looks for the BLKID_DEBUG environment variable to
+               # enable debbugging, with getenv(3). Some suid-root programs use libblkid,
+               # such as mount(1). e2fsprogs includes a safe_getenv() function, which calls
+               # __secure_getenv() from libc. __secure_getenv will restrict some environment
+               # variables if the user is suid or sgid. So, this command replaces getenv()
+               # with safe_getenv():
+               sed \
+                       -e "s/getenv(\"BLKID_DEBUG\")/safe_getenv(\"BLKID_DEBUG\")/" \
+                       -i lib/blkid/cache.c
+       end
+
+       build
+               cd build
+               ../configure \
+                       --prefix=/usr \
+                       --with-root-prefix="" \
+                       --enable-elf-shlibs \
+                       --disable-libblkid \
+                       --disable-fsck \
+                       --disable-uuidd \
+                       --disable-libuuid
+
+               make %{PARALLELISMFLAGS}
+       end
+
+       test
+               cd build && make check
+       end
+
+       install
+               cd build
+               make install install-libs DESTDIR=%{BUILDROOT}
+
+               ln -svf ../../lib/libcom_err.so.2 %{BUILDROOT}/usr/lib/libcom_err.so
+               ln -svf ../../lib/libe2p.so.2 %{BUILDROOT}/usr/lib/libe2p.so
+               ln -svf ../../lib/libext2fs.so.2 %{BUILDROOT}/usr/lib/libext2fs.so
+               ln -svf ../../lib/libss.so.2 %{BUILDROOT}/usr/lib/libss.so
+       end
+end
+
+packages
+       package %{name}
+               groups += Base
+       end
+       
+       package %{name}-devel
+               template DEVEL
+       end
+end