]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - util-linux/util-linux.nm
openvswitch: Add service file for systemd.
[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 = 1
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 --bindir=/bin \
44 --sbindir=/sbin \
45 --disable-wall \
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}* \
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
84
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
90 end
91 end
92
93 packages
94 package %{name}
95 groups += Base
96
97 requires
98 /etc/pam.d/system-auth
99 end
100
101 obsoletes = util-linux-ng
102
103 conflicts
104 setup < 3.0-2
105 util-linux-ng
106 sysvinit <= 2.86-2
107 end
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
118 end
119
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
127
128 files
129 %{libdir}/libblkid.*
130 end
131 end
132
133 # Package information for libblkid-devel
134 package libblkid-devel
135 summary = Development library and header of libblkid.
136 description = %{summary}
137
138 files
139 %{includedir}/blkid/
140 %{libdir}/libblkid.so
141 %{libdir}/pkgconfig/blkid.pc
142 %{mandir}/man3/*blkid*
143 end
144 end
145
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
153
154 files
155 %{libdir}/libuuid.*
156 end
157 end
158
159 # Package information for libuuid-devel
160 package libuuid-devel
161 summary = Development library and header of libuuid.
162 description = %{summary}
163
164 files
165 %{includedir}/uuid/
166 %{libdir}/libuuid.so
167 %{libdir}/pkgconfig/uuid.pc
168 %{mandir}/man3/*uuid*
169 end
170 end
171
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
179
180 files
181 %{libdir}/libmount.*
182 end
183 end
184
185 # Package information for libmount-devel
186 package libmount-devel
187 summary = Development library and header of libmount.
188 description = %{summary}
189
190 files
191 %{includedir}/mount/
192 %{libdir}/libmount.so
193 %{libdir}/pkgconfig/mount.pc
194 %{mandir}/man3/*mount*
195 end
196 end
197
198 package %{name}-debuginfo
199 template DEBUGINFO
200 end
201 end