]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - util-linux/util-linux.nm
sed: Move everything to /usr.
[people/amarx/ipfire-3.x.git] / util-linux / util-linux.nm
CommitLineData
88b867df 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
88b867df
MT
4###############################################################################
5
802ea3af 6name = util-linux
b7923add 7major_ver = 2.21
a10c58dc 8version = %{major_ver}
b7923add 9release = 1
802ea3af
MT
10
11groups = System/Base
802ea3af
MT
12url = http://kernel.org/~kzak/util-linux/
13license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
14summary = A collection of basic system utilities.
15
16description
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
88b867df 20 program.
802ea3af
MT
21end
22
23source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
24
25build
26 requires
27 audit-devel
28 gettext
29 libcap-devel
30 libselinux-devel
31 libsepol-devel
32 ncurses-devel
33 pam-devel
34 zlib-devel
35 end
36
37 CFLAGS += \
38 -D_LARGEFILE_SOURCE \
39 -D_LARGEFILE64_SOURCE \
40 -D_FILE_OFFSET_BITS=64
41
42 configure_options += \
43 --bindir=/bin \
44 --sbindir=/sbin \
45 --disable-wall \
802ea3af
MT
46 --enable-kill \
47 --enable-login-utils \
48 --enable-partx \
49 --enable-write \
50 --enable-libmount-mount \
51 --with-selinux \
52 --with-audit \
53 --disable-makeinstall-chown \
54 --disable-static
55
56 prepare_cmds
57 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
58 -i $(grep -rl '/etc/adjtime' .)
59 end
60
61 # Build nolodin
62 build_cmds
63 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
64 end
65
66 install_cmds
67 mkdir -pv %{BUILDROOT}/sbin \
68 %{BUILDROOT}/var/lib/hwclock \
69 %{BUILDROOT}/usr/share/man/man8 \
70 %{BUILDROOT}/var/log
71
72 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin
73 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
74
75 touch %{BUILDROOT}/var/log/lastlog
76
77 # Remove deprecated commands
78 rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
44ed57ab
MT
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}.*
802ea3af
MT
83 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
84
daf779d6
MT
85 # Set capabilities
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
802ea3af 90 end
802ea3af 91end
4eb2b603 92
802ea3af
MT
93packages
94 package %{name}
7dffb82f
MT
95 groups += Base
96
97 requires
98 /etc/pam.d/system-auth
99 end
100
101 obsoletes = util-linux-ng
102
103 conflicts
fc95e010 104 setup < 3.0-2
7dffb82f 105 util-linux-ng
fc95e010 106 sysvinit <= 2.86-2
7dffb82f 107 end
50f0e95a
MT
108
109 preprequires += coreutils
110
111 script postin
112 touch /var/log/lastlog
113
114 # mtab symlink
115 rm -f /etc/mtab
116 ln -s /proc/mounts /etc/mtab
117 end
802ea3af 118 end
44ed57ab 119
802ea3af
MT
120 # Package information for libblkid
121 package libblkid
122 summary = Block device ID library.
123 description
124 This is the block device identification library,
125 part of util-linux.
126 end
1f9bc2f0 127
802ea3af 128 files
fc95e010 129 %{libdir}/libblkid.*
802ea3af
MT
130 end
131 end
44ed57ab 132
802ea3af 133 # Package information for libblkid-devel
44ed57ab 134 package libblkid-devel
802ea3af
MT
135 summary = Development library and header of libblkid.
136 description = %{summary}
1f9bc2f0 137
802ea3af 138 files
fc95e010
MT
139 %{includedir}/blkid/
140 %{libdir}/libblkid.so
2a0484c1 141 %{libdir}/pkgconfig/blkid.pc
fc95e010 142 %{mandir}/man3/*blkid*
802ea3af
MT
143 end
144 end
44ed57ab 145
802ea3af
MT
146 # Package information for libuuid
147 package libuuid
148 summary = Universally unique ID library.
149 description
150 This is the universally unique ID library,
151 part of util-linux.
152 end
1f9bc2f0 153
802ea3af 154 files
fc95e010 155 %{libdir}/libuuid.*
802ea3af
MT
156 end
157 end
44ed57ab 158
802ea3af
MT
159 # Package information for libuuid-devel
160 package libuuid-devel
161 summary = Development library and header of libuuid.
162 description = %{summary}
1f9bc2f0 163
802ea3af 164 files
fc95e010
MT
165 %{includedir}/uuid/
166 %{libdir}/libuuid.so
2a0484c1 167 %{libdir}/pkgconfig/uuid.pc
fc95e010 168 %{mandir}/man3/*uuid*
802ea3af
MT
169 end
170 end
44ed57ab 171
802ea3af
MT
172 # Package information for libmount
173 package libmount
174 summary = Device mounting library.
175 description
176 This is the device mounting library,
177 part of util-linux.
178 end
1f9bc2f0 179
802ea3af 180 files
fc95e010 181 %{libdir}/libmount.*
802ea3af
MT
182 end
183 end
44ed57ab 184
802ea3af
MT
185 # Package information for libmount-devel
186 package libmount-devel
187 summary = Development library and header of libmount.
188 description = %{summary}
1f9bc2f0 189
802ea3af 190 files
fc95e010
MT
191 %{includedir}/mount/
192 %{libdir}/libmount.so
2a0484c1 193 %{libdir}/pkgconfig/mount.pc
fc95e010 194 %{mandir}/man3/*mount*
802ea3af
MT
195 end
196 end
1f9bc2f0
MT
197
198 package %{name}-debuginfo
199 template DEBUGINFO
200 end
802ea3af 201end