--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = util-linux
+version = 2.19
+major_ver = 2.19
+release = 2
+
+groups = System/Base
+#groups-%{name} = Base %{groups}
+url = http://kernel.org/~kzak/util-linux/
+license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
+summary = A collection of basic system utilities.
+
+description
+ The util-linux package contains a large variety of low-level system
+ utilities that are necessary for a Linux system to function. Among
+ others, Util-linux contains the fdisk configuration tool and the login
+ program.
+end
+
+source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
+
+build
+ requires
+ audit-devel
+ gettext
+ libcap-devel
+ libselinux-devel
+ libsepol-devel
+ ncurses-devel
+ pam-devel
+ zlib-devel
+ end
+
+ CFLAGS += \
+ -D_LARGEFILE_SOURCE \
+ -D_LARGEFILE64_SOURCE \
+ -D_FILE_OFFSET_BITS=64
+
+ configure_options += \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --disable-wall \
+ --enable-arch \
+ --enable-kill \
+ --enable-login-utils \
+ --enable-partx \
+ --enable-write \
+ --enable-libmount-mount \
+ --with-selinux \
+ --with-audit \
+ --disable-makeinstall-chown \
+ --disable-static
+
+ prepare_cmds
+ sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
+ -i $(grep -rl '/etc/adjtime' .)
+ end
+
+ # Build nolodin
+ build_cmds
+ gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
+ end
+
+ install_cmds
+ mkdir -pv %{BUILDROOT}/sbin \
+ %{BUILDROOT}/var/lib/hwclock \
+ %{BUILDROOT}/usr/share/man/man8 \
+ %{BUILDROOT}/var/log
+
+ install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin
+ install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
+
+ touch %{BUILDROOT}/var/log/lastlog
+
+ # Remove deprecated commands
+ rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
+ %{BUILDROOT}/usr/bin/chkdupexe %{BUILDROOT}/usr/bin/vi{gr,pw} \
+ %{BUILDROOT}/sbin/{sln,shutdown} %{BUILDROOT}/bin/{line,newgrp,pg}
+ rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
+
+ # Create /etc/mtab symlink
+ mkdir -pv %{BUILDROOT}/etc
+ ln -svf /proc/mounts %{BUILDROOT}/etc/mtab
+ end
+
+ export PKG_REQUIRES_FILTER = /proc/.*/mounts
+end
+
+# This symlink is allowed to be absolute.
+quality-agent
+ whitelist_symlink
+ /etc/mtab
+ end
+end
+
+packages
+ package %{name}
+ requires = /etc/pam.d/system-auth
+ end
+
+ # Package information for libblkid
+ package libblkid
+ summary = Block device ID library.
+ description
+ This is the block device identification library,
+ part of util-linux.
+ end
+
+ files
+ /lib/libblkid.*
+ end
+ end
+
+ # Package information for libblkid-devel
+ package libblikid-devel
+ summary = Development library and header of libblkid.
+ description = %{summary}
+
+ files
+ /usr/include/blkid/
+ /usr/lib/libblkid.*
+ /usr/lib/pkgconfig/blkid.pc
+ /usr/share/man/man3/*blkid*
+ end
+ end
+
+ # Package information for libuuid
+ package libuuid
+ summary = Universally unique ID library.
+ description
+ This is the universally unique ID library,
+ part of util-linux.
+ end
+
+ files
+ /lib/libuuid.*
+ end
+ end
+
+ # Package information for libuuid-devel
+ package libuuid-devel
+ summary = Development library and header of libuuid.
+ description = %{summary}
+
+ files
+ /usr/include/uuid/
+ /usr/lib/libuuid.*
+ /usr/lib/pkgconfig/uuid.pc
+ /usr/share/man/man3/*uuid*
+ end
+ end
+
+ # Package information for libmount
+ package libmount
+ summary = Device mounting library.
+ description
+ This is the device mounting library,
+ part of util-linux.
+ end
+
+ files
+ /lib/libmount.*
+ end
+ end
+
+ # Package information for libmount-devel
+ package libmount-devel
+ summary = Development library and header of libmount.
+ description = %{summary}
+
+ files
+ /usr/include/mount/
+ /usr/lib/libmount.*
+ /usr/lib/pkgconfig/mount.pc
+ /usr/share/man/man3/*mount*
+ end
+ end
+end