]> git.ipfire.org Git - ipfire-3.x.git/blob - util-linux/util-linux.nm
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
[ipfire-3.x.git] / util-linux / util-linux.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = util-linux
7 major_ver = 2.21
8 version = %{major_ver}
9 release = 4
10
11 groups = System/Base
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.
15
16 description
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
20 program.
21 end
22
23 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
24
25 build
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 --disable-wall \
44 --enable-kill \
45 --enable-login-utils \
46 --enable-partx \
47 --enable-write \
48 --enable-libmount-mount \
49 --with-selinux \
50 --with-audit \
51 --disable-makeinstall-chown \
52 --disable-static
53
54 prepare_cmds
55 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
56 -i $(grep -rl '/etc/adjtime' .)
57 end
58
59 # Build nolodin
60 build_cmds
61 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
62 end
63
64 install_cmds
65 mkdir -pv \
66 %{BUILDROOT}/var/lib/hwclock \
67 %{BUILDROOT}/usr/share/man/man8 \
68 %{BUILDROOT}/var/log
69
70 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
71 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
72
73 touch %{BUILDROOT}/var/log/lastlog
74
75 # Remove deprecated commands
76 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
77 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
78 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
79 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
80 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
81 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
82
83 # Set capabilities
84 chmod -v -s %{BUILDROOT}%{bindir}/mount
85 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
86 chmod -v -s %{BUILDROOT}%{bindir}/umount
87 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
88 end
89 end
90
91 packages
92 package %{name}
93 groups += Base
94
95 requires
96 /etc/pam.d/system-auth
97 end
98
99 provides
100 /bin/dmesg
101 /bin/kill
102 /bin/more
103 /bin/mount
104 /bin/umount
105 /sbin/blkid
106 /sbin/blockdev
107 /sbin/findfs
108 /sbin/fsck
109 /sbin/nologin
110 end
111
112 obsoletes = util-linux-ng
113
114 conflicts
115 filesystem < 002
116 setup < 3.0-2
117 util-linux-ng
118 sysvinit <= 2.86-2
119 end
120
121 preprequires += coreutils
122
123 script postin
124 touch /var/log/lastlog
125
126 # mtab symlink
127 rm -f /etc/mtab
128 ln -s /proc/mounts /etc/mtab
129 end
130 end
131
132 # Package information for libblkid
133 package libblkid
134 summary = Block device ID library.
135 description
136 This is the block device identification library,
137 part of util-linux.
138 end
139
140 conflicts = filesystem < 002
141
142 files
143 %{libdir}/libblkid.*
144 end
145 end
146
147 # Package information for libblkid-devel
148 package libblkid-devel
149 summary = Development library and header of libblkid.
150 description = %{summary}
151
152 requires
153 libuuid-devel
154 end
155
156 files
157 %{includedir}/blkid/
158 %{libdir}/libblkid.so
159 %{libdir}/pkgconfig/blkid.pc
160 %{mandir}/man3/*blkid*
161 end
162 end
163
164 # Package information for libuuid
165 package libuuid
166 summary = Universally unique ID library.
167 description
168 This is the universally unique ID library,
169 part of util-linux.
170 end
171
172 conflicts = filesystem < 002
173
174 files
175 %{libdir}/libuuid.*
176 end
177 end
178
179 # Package information for libuuid-devel
180 package libuuid-devel
181 summary = Development library and header of libuuid.
182 description = %{summary}
183
184 files
185 %{includedir}/uuid/
186 %{libdir}/libuuid.so
187 %{libdir}/pkgconfig/uuid.pc
188 %{mandir}/man3/*uuid*
189 end
190 end
191
192 # Package information for libmount
193 package libmount
194 summary = Device mounting library.
195 description
196 This is the device mounting library,
197 part of util-linux.
198 end
199
200 conflicts = filesystem < 002
201
202 files
203 %{libdir}/libmount.*
204 end
205 end
206
207 # Package information for libmount-devel
208 package libmount-devel
209 summary = Development library and header of libmount.
210 description = %{summary}
211
212 files
213 %{includedir}/libmount/
214 %{libdir}/libmount.so
215 %{libdir}/pkgconfig/mount.pc
216 %{mandir}/man3/*mount*
217 end
218 end
219
220 package %{name}-debuginfo
221 template DEBUGINFO
222 end
223 end