]>
Commit | Line | Data |
---|---|---|
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 | 6 | name = util-linux |
a10c58dc MT |
7 | major_ver = 2.20 |
8 | version = %{major_ver} | |
9 | release = 1 | |
802ea3af MT |
10 | |
11 | groups = System/Base | |
802ea3af MT |
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 | |
88b867df | 20 | program. |
802ea3af MT |
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 \ | |
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 | 91 | end |
4eb2b603 | 92 | |
802ea3af MT |
93 | packages |
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 | |
104 | setup<3.0-2 | |
105 | util-linux-ng | |
a10c58dc | 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 | |
127 | ||
128 | files | |
129 | /lib/libblkid.* | |
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} | |
137 | ||
138 | files | |
139 | /usr/include/blkid/ | |
140 | /usr/lib/libblkid.* | |
141 | /usr/lib/pkgconfig/blkid.pc | |
142 | /usr/share/man/man3/*blkid* | |
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 | |
153 | ||
154 | files | |
155 | /lib/libuuid.* | |
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} | |
163 | ||
164 | files | |
165 | /usr/include/uuid/ | |
166 | /usr/lib/libuuid.* | |
167 | /usr/lib/pkgconfig/uuid.pc | |
168 | /usr/share/man/man3/*uuid* | |
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 | |
179 | ||
180 | files | |
181 | /lib/libmount.* | |
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} | |
189 | ||
190 | files | |
191 | /usr/include/mount/ | |
192 | /usr/lib/libmount.* | |
193 | /usr/lib/pkgconfig/mount.pc | |
194 | /usr/share/man/man3/*mount* | |
195 | end | |
196 | end | |
197 | end |