1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
12 url = http://kernel.org/~kzak/util-linux/
13 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
14 summary = A collection of basic system utilities.
17 The util-linux package contains a large variety of low-level system
18 utilities that are necessary for a Linux system to function. Among
19 others, Util-linux contains the fdisk configuration tool and the login
23 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
39 -D_LARGEFILE64_SOURCE \
40 -D_FILE_OFFSET_BITS=64
42 configure_options += \
47 --enable-login-utils \
50 --enable-libmount-mount \
53 --disable-makeinstall-chown \
57 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
58 -i $(grep -rl '/etc/adjtime' .)
63 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
67 mkdir -pv %{BUILDROOT}/sbin \
68 %{BUILDROOT}/var/lib/hwclock \
69 %{BUILDROOT}/usr/share/man/man8 \
72 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin
73 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
75 touch %{BUILDROOT}/var/log/lastlog
77 # Remove deprecated commands
78 rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
79 %{BUILDROOT}/usr/{,s}bin/{chkdupexe,newgrp,vi{gr,pw}} \
80 %{BUILDROOT}/sbin/{sln,shutdown} %{BUILDROOT}/bin/{line,pg}
81 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
82 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
83 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
86 chmod -v -s %{BUILDROOT}/bin/mount
87 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/mount
88 chmod -v -s %{BUILDROOT}/bin/umount
89 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/umount
98 /etc/pam.d/system-auth
101 obsoletes = util-linux-ng
109 preprequires += coreutils
112 touch /var/log/lastlog
116 ln -s /proc/mounts /etc/mtab
120 # Package information for libblkid
122 summary = Block device ID library.
124 This is the block device identification library,
133 # Package information for libblkid-devel
134 package libblkid-devel
135 summary = Development library and header of libblkid.
136 description = %{summary}
141 /usr/lib/pkgconfig/blkid.pc
142 /usr/share/man/man3/*blkid*
146 # Package information for libuuid
148 summary = Universally unique ID library.
150 This is the universally unique ID library,
159 # Package information for libuuid-devel
160 package libuuid-devel
161 summary = Development library and header of libuuid.
162 description = %{summary}
167 /usr/lib/pkgconfig/uuid.pc
168 /usr/share/man/man3/*uuid*
172 # Package information for libmount
174 summary = Device mounting library.
176 This is the device mounting library,
185 # Package information for libmount-devel
186 package libmount-devel
187 summary = Development library and header of libmount.
188 description = %{summary}
193 /usr/lib/pkgconfig/mount.pc
194 /usr/share/man/man3/*mount*
198 package %{name}-debuginfo