]>
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 | |
765cf0e9 | 28 | PKG_VER = 2.18 |
88b867df MT |
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 | ||
605cd393 | 37 | PKG_BUILD_DEPS+= gettext libcap-devel ncurses-devel pam-devel zlib-devel |
88b867df MT |
38 | |
39 | define PKG_DESCRIPTION | |
40 | The util-linux-ng package contains a large variety of low-level system \ | |
41 | utilities that are necessary for a Linux system to function. Among \ | |
42 | others, Util-linux contains the fdisk configuration tool and the login \ | |
43 | program. | |
44 | endef | |
45 | ||
765cf0e9 | 46 | PKG_TARBALL = $(THISAPP).tar.gz |
88b867df | 47 | |
605cd393 MT |
48 | PKG_PACKAGES += $(PKG_NAME)-devel |
49 | ||
88b867df MT |
50 | CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
51 | ||
a4453cda SS |
52 | CONFIGURE_OPTIONS += \ |
53 | --bindir=/bin \ | |
54 | --sbindir=/sbin \ | |
55 | --disable-wall \ | |
56 | --enable-arch \ | |
57 | --enable-kill \ | |
58 | --enable-login-utils \ | |
59 | --enable-partx \ | |
60 | --enable-write \ | |
61 | --disable-makeinstall-chown \ | |
62 | --disable-static | |
63 | ||
88b867df MT |
64 | |
65 | define STAGE_PREPARE_CMDS | |
66 | cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ | |
67 | -i $$(grep -rl '/etc/adjtime' .) | |
68 | endef | |
69 | ||
a4453cda | 70 | define STAGE_BUILD_CMDS |
88b867df MT |
71 | # Build nologin |
72 | cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c | |
88b867df MT |
73 | endef |
74 | ||
a4453cda | 75 | define STAGE_INSTALL_CMDS |
88b867df MT |
76 | -mkdir -pv $(BUILDROOT)/sbin \ |
77 | $(BUILDROOT)/var/lib/hwclock \ | |
78 | $(BUILDROOT)/usr/share/man/man8 \ | |
79 | $(BUILDROOT)/var/log | |
80 | ||
81 | install -m 755 $(DIR_APP)/nologin $(BUILDROOT)/sbin | |
82 | install -m 644 $(DIR_SOURCE)/nologin.8 $(BUILDROOT)/usr/share/man/man8/ | |
83 | ||
84 | touch $(BUILDROOT)/var/log/lastlog | |
85 | ||
86 | # Remove deprecated commands | |
605cd393 MT |
87 | rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \ |
88 | $(BUILDROOT)/usr/bin/chkdupexe $(BUILDROOT)/usr/bin/vi{gr,pw} \ | |
89 | $(BUILDROOT)/sbin/{sln,shutdown} $(BUILDROOT)/bin/{line,newgrp,pg} | |
90 | rm -fv $(BUILDROOT)/usr/share/getopt/*.tcsh | |
88b867df | 91 | |
88b867df MT |
92 | # Set capabilities |
93 | chmod -v -s $(BUILDROOT)/bin/mount | |
94 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/mount | |
95 | chmod -v -s $(BUILDROOT)/bin/umount | |
96 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/umount | |
97 | endef |