]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blame - pkgs/core/util-linux-ng/util-linux-ng.nm
Merge remote branch 'stevee/updates' into next
[people/pmueller/ipfire-3.x.git] / pkgs / core / util-linux-ng / util-linux-ng.nm
CommitLineData
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
25include $(PKGROOT)/Include
26
27PKG_NAME = util-linux-ng
765cf0e9 28PKG_VER = 2.18
88b867df
MT
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = System/Base
33PKG_URL = ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
34PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
35PKG_SUMMARY = A collection of basic system utilities.
36
605cd393 37PKG_BUILD_DEPS+= gettext libcap-devel ncurses-devel pam-devel zlib-devel
88b867df
MT
38
39define 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.
44endef
45
765cf0e9 46PKG_TARBALL = $(THISAPP).tar.gz
88b867df 47
605cd393
MT
48PKG_PACKAGES += $(PKG_NAME)-devel
49
88b867df
MT
50CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
51
a4453cda
SS
52CONFIGURE_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
65define STAGE_PREPARE_CMDS
66 cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
67 -i $$(grep -rl '/etc/adjtime' .)
68endef
69
a4453cda 70define STAGE_BUILD_CMDS
88b867df
MT
71 # Build nologin
72 cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c
88b867df
MT
73endef
74
a4453cda 75define 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
97endef