util-linux: build with -fPIC, use vmove().

This commit is contained in:
Juan RP 2011-07-03 00:24:33 +02:00
parent 0be1e7660f
commit e8ac3766c7
7 changed files with 42 additions and 35 deletions

View file

@ -7,19 +7,16 @@ long_desc="
This package contains files for development, headers, static libs, etc." This package contains files for development, headers, static libs, etc."
revision=1
Add_dependency run zlib-devel Add_dependency run zlib-devel
Add_dependency run libuuid-devel Add_dependency run libuuid-devel
Add_dependency run libblkid Add_dependency run libblkid
do_install() do_install()
{ {
mkdir -p ${DESTDIR}/usr/include/blkid ${DESTDIR}/usr/share/man/man3 \ vmove usr/include/blkid usr/include
${DESTDIR}/usr/lib/pkgconfig vmove usr/lib/libblkid.a usr/lib
vmove usr/lib/pkgconfig/blkid.pc usr/lib/pkgconfig
mv ${SRCPKGDESTDIR}/usr/include/blkid ${DESTDIR}/usr/include vmove usr/share/man/man3/libblkid.3 usr/share/man/man3
mv ${SRCPKGDESTDIR}/usr/lib/libblkid.a ${DESTDIR}/usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig/blkid.pc \
${DESTDIR}/usr/lib/pkgconfig
mv ${SRCPKGDESTDIR}/usr/share/man/man3/libblkid.3 \
${DESTDIR}/usr/share/man/man3
} }

View file

@ -5,13 +5,14 @@ long_desc="
The libblkid package contains a library to handle device identification The libblkid package contains a library to handle device identification
and token extraction." and token extraction."
revision=1
Add_dependency run glibc Add_dependency run glibc
Add_dependency run zlib Add_dependency run zlib
Add_dependency run libuuid Add_dependency run libuuid
do_install() do_install()
{ {
mkdir -p ${DESTDIR}/lib ${DESTDIR}/usr/lib vmove "lib/libblkid.so*" lib
mv ${SRCPKGDESTDIR}/lib/libblkid.so* ${DESTDIR}/lib vmove usr/lib/libblkid.so usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/libblkid.so ${DESTDIR}/usr/lib
} }

View file

@ -8,6 +8,8 @@ long_desc="
This packages contains files for development, static files, headers, etc." This packages contains files for development, static files, headers, etc."
revision=1
Add_dependency run glibc-devel Add_dependency run glibc-devel
Add_dependency run libblkid-devel Add_dependency run libblkid-devel
Add_dependency run libuuid-devel Add_dependency run libuuid-devel

View file

@ -6,13 +6,14 @@ long_desc="
mount(8) and /sbin/mount.<type> helpers as well as in some other mount(8) and /sbin/mount.<type> helpers as well as in some other
projects." projects."
revision=1
Add_dependency run glibc Add_dependency run glibc
Add_dependency run libblkid Add_dependency run libblkid
Add_dependency run libuuid Add_dependency run libuuid
do_install() do_install()
{ {
mkdir -p ${DESTDIR}/lib ${DESTDIR}/usr/lib vmove "lib/libmount.so*" lib
mv ${SRCPKGDESTDIR}/lib/libmount.so* ${DESTDIR}/lib vmove usr/lib/libmount.so usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/libmount.so ${DESTDIR}/usr/lib
} }

View file

@ -7,13 +7,14 @@ long_desc="
This packages contains files for development, static files, headers, etc." This packages contains files for development, static files, headers, etc."
revision=1
Add_dependency run glibc-devel Add_dependency run glibc-devel
do_install() do_install()
{ {
mkdir -p ${DESTDIR}/usr/share/man ${DESTDIR}/usr/lib vmove usr/lib/libuuid.a usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/libuuid.a ${DESTDIR}/usr/lib vmove usr/lib/pkgconfig usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib vmove usr/include usr
mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr vmove usr/share/man/man3 usr/share/man
mv ${SRCPKGDESTDIR}/usr/share/man/man3 ${DESTDIR}/usr/share/man
} }

View file

@ -5,11 +5,12 @@ long_desc="
libuuid generates and parses 128-bit universally unique id's (UUIDs). libuuid generates and parses 128-bit universally unique id's (UUIDs).
See RFC 4122 for more information." See RFC 4122 for more information."
revision=1
Add_dependency run glibc Add_dependency run glibc
do_install() do_install()
{ {
mkdir -p ${DESTDIR}/lib ${DESTDIR}/usr/lib vmove "lib/libuuid.so*" lib
mv ${SRCPKGDESTDIR}/lib/libuuid.so* ${DESTDIR}/lib vmove usr/lib/libuuid.so usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/libuuid.so ${DESTDIR}/usr/lib
} }

View file

@ -6,10 +6,7 @@ version=${_distver}.${_patchver}
revision=1 revision=1
wrksrc=${pkgname}-${version} wrksrc=${pkgname}-${version}
distfiles="${KERNEL_SITE}/utils/${pkgname}/v${_distver}/${pkgname}-${version}.tar.bz2" distfiles="${KERNEL_SITE}/utils/${pkgname}/v${_distver}/${pkgname}-${version}.tar.bz2"
build_style=gnu_configure build_style=custom-install
configure_args="--enable-partx --enable-write --enable-libuuid
--enable-libblkid --enable-fsck --disable-rpath --with-gnu-ld
--disable-makeinstall-chown"
short_desc="Miscellaneous linux utilities" short_desc="Miscellaneous linux utilities"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
checksum=d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d checksum=d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d
@ -24,33 +21,40 @@ subpackages="libmount libmount-devel libblkid libblkid-devel libuuid libuuid-dev
keep_empty_dirs=yes keep_empty_dirs=yes
Add_dependency run glibc Add_dependency run glibc
Add_dependency run coreutils
Add_dependency run zlib Add_dependency run zlib
Add_dependency run coreutils
Add_dependency run libuuid Add_dependency run libuuid
Add_dependency run libblkid Add_dependency run libblkid
Add_dependency run libmount Add_dependency run libmount
Add_dependency run ncurses-libs Add_dependency run ncurses-libs
Add_dependency run shadow Add_dependency run shadow
Add_dependency build pkg-config Add_dependency build pkg-config
Add_dependency build gettext Add_dependency build gettext
Add_dependency build zlib-devel Add_dependency build zlib-devel
Add_dependency build ncurses-devel Add_dependency build ncurses-devel
post_configure() do_build()
{ {
export CFLAGS="$XBPS_CFLAGS -fPIC"
./configure --prefix=/usr --enable-partx --enable-write \
--enable-libuuid --disable-makeinstall-chown \
--enable-libblkid --enable-fsck --disable-rpath
for f in $(grep -rl '/etc/adjtime' .); do for f in $(grep -rl '/etc/adjtime' .); do
sed -i -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' $f sed -i -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' $f
done done
make ${makejobs}
} }
post_install() do_install()
{ {
make DESTDIR=${DESTDIR} install
# Move logger to /bin. # Move logger to /bin.
install -d -m 755 ${DESTDIR}/bin vmkdir bin
mv ${DESTDIR}/usr/bin/logger ${DESTDIR}/bin mv ${DESTDIR}/usr/bin/logger ${DESTDIR}/bin
mkdir -p ${DESTDIR}/var/lib/hwclock vmkdir var/lib/hwclock
# Install the cron daily job. # Install the cron daily job.
install -D -m744 ${FILESDIR}/adjtime.cron-hourly \ vinstall ${FILESDIR}/adjtime.cron-hourly 744 etc/cron.hourly adjtime
${DESTDIR}/etc/cron.hourly/adjtime
} }