]>
Commit | Line | Data |
---|---|---|
88b867df MT |
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 $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = util-linux-ng | |
28 | PKG_VER = 2.16.1 | |
29 | PKG_REL = 0 | |
30 | ||
31 | PKG_MAINTAINER = | |
32 | PKG_GROUP = System/Base | |
33 | PKG_URL = ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng | |
34 | PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain | |
35 | PKG_SUMMARY = A collection of basic system utilities. | |
36 | ||
37 | PKG_BUILD_DEPS+= libcap | |
38 | PKG_DEPS += ncurses pam zlib | |
39 | ||
40 | define PKG_DESCRIPTION | |
41 | The util-linux-ng package contains a large variety of low-level system \ | |
42 | utilities that are necessary for a Linux system to function. Among \ | |
43 | others, Util-linux contains the fdisk configuration tool and the login \ | |
44 | program. | |
45 | endef | |
46 | ||
47 | PKG_TARBALL = $(THISAPP).tar.bz2 | |
48 | ||
49 | CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | |
50 | ||
51 | ############################################################################### | |
52 | # Installation Details | |
53 | ############################################################################### | |
54 | ||
55 | define STAGE_PREPARE_CMDS | |
56 | cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ | |
57 | -i $$(grep -rl '/etc/adjtime' .) | |
58 | endef | |
59 | ||
60 | define STAGE_BUILD | |
61 | cd $(DIR_APP) && \ | |
62 | ./configure \ | |
63 | $(CONFIGURE_ARCH) \ | |
64 | --prefix=/usr \ | |
65 | --bindir=/bin \ | |
66 | --sbindir=/sbin \ | |
67 | --disable-wall \ | |
68 | --enable-arch \ | |
69 | --enable-kill \ | |
70 | --enable-login-utils \ | |
71 | --enable-partx \ | |
72 | --enable-write \ | |
73 | --disable-makeinstall-chown \ | |
74 | --disable-static | |
75 | ||
76 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) | |
77 | ||
78 | # Build nologin | |
79 | cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c | |
80 | ||
81 | endef | |
82 | ||
83 | define STAGE_INSTALL | |
84 | cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT) | |
85 | ||
86 | -mkdir -pv $(BUILDROOT)/sbin \ | |
87 | $(BUILDROOT)/var/lib/hwclock \ | |
88 | $(BUILDROOT)/usr/share/man/man8 \ | |
89 | $(BUILDROOT)/var/log | |
90 | ||
91 | install -m 755 $(DIR_APP)/nologin $(BUILDROOT)/sbin | |
92 | install -m 644 $(DIR_SOURCE)/nologin.8 $(BUILDROOT)/usr/share/man/man8/ | |
93 | ||
94 | touch $(BUILDROOT)/var/log/lastlog | |
95 | ||
96 | # Remove deprecated commands | |
97 | rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* | |
98 | ||
99 | # PAM | |
100 | -mkdir -pv $(BUILDROOT)/etc/pam.d | |
101 | cp -vf $(DIR_SOURCE)/pam.d/login $(BUILDROOT)/etc/pam.d | |
102 | ||
103 | # Set capabilities | |
104 | chmod -v -s $(BUILDROOT)/bin/mount | |
105 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/mount | |
106 | chmod -v -s $(BUILDROOT)/bin/umount | |
107 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/umount | |
108 | endef | |
109 |