]> git.ipfire.org Git - ipfire-3.x.git/blame - pkgs/util-linux/util-linux.nm
avahi: Update to 0.6.30.
[ipfire-3.x.git] / pkgs / util-linux / util-linux.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
bdbbdbff
MT
27PKG_NAME = util-linux
28PKG_VER = 2.19
fc5338fa 29PKG_REL = 2
88b867df
MT
30
31PKG_MAINTAINER =
bb7d617c 32PKG_GROUPS = System/Base
b42a752b 33PKG_GROUPS-$(PKG_NAME) = Base $(PKG_GROUPS)
bdbbdbff 34PKG_URL = http://kernel.org/~kzak/util-linux/
88b867df
MT
35PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
36PKG_SUMMARY = A collection of basic system utilities.
37
de50740a
MT
38PKG_BUILD_DEPS+= audit-devel gettext libcap-devel libselinux-devel \
39 libsepol-devel ncurses-devel pam-devel zlib-devel
fc5338fa 40PKG_DEPS += /etc/pam.d/system-auth
88b867df
MT
41
42define PKG_DESCRIPTION
bdbbdbff 43 The util-linux package contains a large variety of low-level system \
88b867df
MT
44 utilities that are necessary for a Linux system to function. Among \
45 others, Util-linux contains the fdisk configuration tool and the login \
46 program.
47endef
48
765cf0e9 49PKG_TARBALL = $(THISAPP).tar.gz
88b867df 50
4eb2b603
SS
51PKG_PACKAGES += libblkid libblkid-devel libuuid libuuid-devel \
52 libmount libmount-devel
53
d2ab169e
MT
54# This symlink is allowed to be absolute.
55QUALITY_AGENT_WHITELIST_SYMLINK = /etc/mtab
56PKG_REQUIRES_FILTER = /proc/.*/mounts
57
4eb2b603
SS
58# Package information for libblkid
59PKG_SUMMARY-libblkid = Block device ID library.
60PKG_DESCRIPTION-libblkid = This is the block device identification library, \
bdbbdbff 61 part of util-linux.
4eb2b603
SS
62
63define PKG_FILES-libblkid
64 /lib/libblkid.*
65endef
66
67# Package information for libblkid-devel
68PKG_SUMMARY-libblkid-devel = Development library and header of libblkid.
69PKG_DESCRIPTION-libblkid-devel = $(PKG_SUMMARY-libblkid-devel)
70
71define PKG_FILES-libblkid-devel
72 /usr/include/blkid/ \
73 /usr/lib/libblkid.* \
74 /usr/lib/pkgconfig/blkid.pc \
75 /usr/share/man/man3/*blkid*
76endef
77
78# Package information for libuuid
79PKG_SUMMARY-libuuid = Universally unique ID library.
80PKG_DESCRIPTION-libuuid = This is the universally unique ID library, \
bdbbdbff 81 part of util-linux.
4eb2b603
SS
82
83define PKG_FILES-libuuid
84 /lib/libuuid.*
85endef
86
87# Package information for libuuid-devel
88PKG_SUMMARY-libuuid-devel = Development library and header of libuuid.
89PKG_DESCRIPTION-libuuid-devel = $(PKG_SUMMARY-libuuid-devel)
90
91define PKG_FILES-libuuid-devel
92 /usr/include/uuid/ \
93 /usr/lib/libuuid.* \
94 /usr/lib/pkgconfig/uuid.pc \
95 /usr/share/man/man3/*uuid*
96endef
97
98# Package information for libmount
99PKG_SUMMARY-libmount = Device mounting library.
100PKG_DESCRIPTION-libmount = This is the device mounting library, \
bdbbdbff 101 part of util-linux.
4eb2b603
SS
102
103define PKG_FILES-libmount
104 /lib/libmount.*
105endef
106
107# Package information for libmount-devel
108PKG_SUMMARY-libmount-devel = Development library and header of libmount.
109PKG_DESCRIPTION-libmount-devel = $(PKG_SUMMARY-libmount-devel)
110
111define PKG_FILES-libmount-devel
112 /usr/include/mount/ \
113 /usr/lib/libmount.* \
114 /usr/lib/pkgconfig/mount.pc \
115 /usr/share/man/man3/*mount*
116endef
117
605cd393 118
88b867df
MT
119CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
120
a4453cda
SS
121CONFIGURE_OPTIONS += \
122 --bindir=/bin \
123 --sbindir=/sbin \
124 --disable-wall \
125 --enable-arch \
126 --enable-kill \
127 --enable-login-utils \
128 --enable-partx \
129 --enable-write \
d2ab169e 130 --enable-libmount-mount \
79be82dc
SS
131 --with-selinux \
132 --with-audit \
a4453cda
SS
133 --disable-makeinstall-chown \
134 --disable-static
135
88b867df
MT
136
137define STAGE_PREPARE_CMDS
138 cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
139 -i $$(grep -rl '/etc/adjtime' .)
140endef
141
a4453cda 142define STAGE_BUILD_CMDS
88b867df
MT
143 # Build nologin
144 cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c
88b867df
MT
145endef
146
a4453cda 147define STAGE_INSTALL_CMDS
88b867df
MT
148 -mkdir -pv $(BUILDROOT)/sbin \
149 $(BUILDROOT)/var/lib/hwclock \
150 $(BUILDROOT)/usr/share/man/man8 \
151 $(BUILDROOT)/var/log
152
153 install -m 755 $(DIR_APP)/nologin $(BUILDROOT)/sbin
154 install -m 644 $(DIR_SOURCE)/nologin.8 $(BUILDROOT)/usr/share/man/man8/
155
156 touch $(BUILDROOT)/var/log/lastlog
157
158 # Remove deprecated commands
605cd393
MT
159 rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
160 $(BUILDROOT)/usr/bin/chkdupexe $(BUILDROOT)/usr/bin/vi{gr,pw} \
161 $(BUILDROOT)/sbin/{sln,shutdown} $(BUILDROOT)/bin/{line,newgrp,pg}
162 rm -fv $(BUILDROOT)/usr/share/getopt/*.tcsh
d2ab169e
MT
163
164 # Create /etc/mtab symlink
165 -mkdir -pv $(BUILDROOT)/etc
166 ln -svf /proc/mounts $(BUILDROOT)/etc/mtab
3fab7979 167endef
88b867df 168
3fab7979 169define STAGE_INSTALL_POST
88b867df
MT
170 # Set capabilities
171 chmod -v -s $(BUILDROOT)/bin/mount
172 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/mount
173 chmod -v -s $(BUILDROOT)/bin/umount
174 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/umount
175endef