]> git.ipfire.org Git - ipfire-3.x.git/blob - pkgs/core/e2fsprogs/e2fsprogs.nm
naoki: Initial checkin.
[ipfire-3.x.git] / pkgs / core / e2fsprogs / e2fsprogs.nm
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include ../../Config
26
27 PKG_NAME = e2fsprogs
28 PKG_VER = 1.41.8
29 PKG_REL = 0
30
31 PKG_MAINTAINER =
32 PKG_GROUP = System/Filesystems
33 PKG_URL = http://e2fsprogs.sourceforge.net/
34 PKG_LICENSE = GPLv2
35 PKG_SUMMARY = Utilities for managing the extended (ext2/ext3/ext4) filesystems.
36
37 define PKG_DESCRIPTION
38 The e2fsprogs package contains a number of utilities for creating, \
39 checking, modifying, and correcting any inconsistencies in second \
40 and third extended (ext2/ext3) filesystems.
41 endef
42
43 PKG_TARBALL = $(THISAPP).tar.gz
44
45 include ../../Rules
46
47 ###############################################################################
48 # Installation Details
49 ###############################################################################
50
51 $(STAGE_PREPARE): $(OBJECTS)
52 @$(PRE_PREPARE)
53 cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(PKG_TARBALL)
54
55 $(DO_PATCHES)
56
57 -mkdir $(DIR_APP)/build
58
59 # Fix DT_TEXTREL in e2fsprogs libraries. --disable-shared and
60 # --with-pic are not options in E2fsprogs:
61 cd $(DIR_APP) && \
62 find lib/ -name Makefile.in -exec sed -i "s/\$$(ALL_CFLAGS)/& -fPIC/" {} \;
63
64 # At run time libblkid looks for the BLKID_DEBUG environment variable to
65 # enable debbugging, with getenv(3). Some suid-root programs use libblkid,
66 # such as mount(1). e2fsprogs includes a safe_getenv() function, which calls
67 # __secure_getenv() from libc. __secure_getenv will restrict some environment
68 # variables if the user is suid or sgid. So, this command replaces getenv()
69 # with safe_getenv():
70 cd $(DIR_APP) && sed \
71 -e "s/getenv(\"BLKID_DEBUG\")/safe_getenv(\"BLKID_DEBUG\")/" \
72 -i lib/blkid/cache.c
73
74 @$(POST_PREPARE)
75
76 $(STAGE_BUILD): $(STAGE_PREPARE)
77 @$(PRE_BUILD)
78
79 cd $(DIR_APP)/build && \
80 LDFLAGS=-lblkid \
81 ../configure \
82 $(CONFIGURE_ARCH) \
83 --prefix=/usr \
84 --with-root-prefix="" \
85 --enable-elf-shlibs \
86 --disable-libblkid \
87 --disable-fsck \
88 --disable-uuidd \
89 --disable-libuuid
90
91 cd $(DIR_APP)/build && make $(PARALLELISMFLAGS)
92
93 @$(POST_BUILD)
94
95 $(STAGE_INSTALL): $(STAGE_BUILD)
96 @$(PRE_INSTALL)
97
98 cd $(DIR_APP)/build && make install DESTDIR=$(BUILDROOT)
99 cd $(DIR_APP)/build && make install-libs DESTDIR=$(BUILDROOT)
100
101 ln -svf ../../lib/libcom_err.so.2 $(BUILDROOT)/usr/lib/libcom_err.so
102 ln -svf ../../lib/libe2p.so.2 $(BUILDROOT)/usr/lib/libe2p.so
103 ln -svf ../../lib/libext2fs.so.2 $(BUILDROOT)/usr/lib/libext2fs.so
104 ln -svf ../../lib/libss.so.2 $(BUILDROOT)/usr/lib/libss.so
105 ln -svf ../../lib/libuuid.so.1 $(BUILDROOT)/usr/lib/libuuid.so
106
107 @$(POST_INSTALL)