]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - util-linux/util-linux.nm
e1c63556cbd8b9354e809a049c5318e8858121f9
[people/amarx/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 = 2
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 files
153 %{includedir}/blkid/
154 %{libdir}/libblkid.so
155 %{libdir}/pkgconfig/blkid.pc
156 %{mandir}/man3/*blkid*
157 end
158 end
159
160 # Package information for libuuid
161 package libuuid
162 summary = Universally unique ID library.
163 description
164 This is the universally unique ID library,
165 part of util-linux.
166 end
167
168 conflicts = filesystem < 002
169
170 files
171 %{libdir}/libuuid.*
172 end
173 end
174
175 # Package information for libuuid-devel
176 package libuuid-devel
177 summary = Development library and header of libuuid.
178 description = %{summary}
179
180 files
181 %{includedir}/uuid/
182 %{libdir}/libuuid.so
183 %{libdir}/pkgconfig/uuid.pc
184 %{mandir}/man3/*uuid*
185 end
186 end
187
188 # Package information for libmount
189 package libmount
190 summary = Device mounting library.
191 description
192 This is the device mounting library,
193 part of util-linux.
194 end
195
196 conflicts = filesystem < 002
197
198 files
199 %{libdir}/libmount.*
200 end
201 end
202
203 # Package information for libmount-devel
204 package libmount-devel
205 summary = Development library and header of libmount.
206 description = %{summary}
207
208 files
209 %{includedir}/mount/
210 %{libdir}/libmount.so
211 %{libdir}/pkgconfig/mount.pc
212 %{mandir}/man3/*mount*
213 end
214 end
215
216 package %{name}-debuginfo
217 template DEBUGINFO
218 end
219 end