mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 13:46:58 +02:00
lsof: cleanup template
* use build-style * rename Lsof.8 -> lsof.8 to match the binary's name * make tests run * get license text from sources, don't ship it
This commit is contained in:
parent
83eca28774
commit
600756641c
2 changed files with 34 additions and 39 deletions
|
@ -1,27 +0,0 @@
|
|||
Copyright 2002 Purdue Research Foundation, West Lafayette,
|
||||
Indiana 47907. All rights reserved.
|
||||
|
||||
Written by Victor A. Abell
|
||||
|
||||
This software is not subject to any license of the American
|
||||
Telephone and Telegraph Company or the Regents of the
|
||||
University of California.
|
||||
|
||||
Permission is granted to anyone to use this software for
|
||||
any purpose on any computer system, and to alter it and
|
||||
redistribute it freely, subject to the following
|
||||
restrictions:
|
||||
|
||||
1. Neither the authors nor Purdue University are responsible
|
||||
for any consequences of the use of this software.
|
||||
|
||||
2. The origin of this software must not be misrepresented,
|
||||
either by explicit claim or by omission. Credit to the
|
||||
authors and Purdue University must appear in documentation
|
||||
and sources.
|
||||
|
||||
3. Altered versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. This notice may not be removed or altered.
|
||||
|
|
@ -1,26 +1,48 @@
|
|||
# Template file for 'lsof'
|
||||
pkgname=lsof
|
||||
version=4.93.2
|
||||
revision=1
|
||||
hostmakedepends="perl"
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_script="./Configure"
|
||||
configure_args="-n linux"
|
||||
hostmakedepends="perl which"
|
||||
short_desc="LiSt Open Files"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="lsof"
|
||||
license="custom:lsof"
|
||||
homepage="https://people.freebsd.org/~abe/"
|
||||
distfiles="https://fossies.org/linux/misc/lsof-${version}.tar.gz"
|
||||
checksum=3df912bd966fc24dc73ddea3e36a61d79270b21b085936a4caabca56e5b486a2
|
||||
|
||||
do_build() {
|
||||
sed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \
|
||||
pre_configure() {
|
||||
export LSOF_CC="$CC"
|
||||
export LSOF_CFGF="$CFLAGS"
|
||||
export LSOF_CFGL="$LDFLAGS"
|
||||
export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include"
|
||||
|
||||
vsed "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \
|
||||
-i dialects/linux/machine.h
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
export LSOF_INCLUDE="${XBPS_CROSS_BASE}/usr/include"
|
||||
fi
|
||||
LSOF_CFGF="$CFLAGS" LSOF_CFGL="$LDFLAGS" ./Configure -n linux
|
||||
make CC=$CC ${makejobs}
|
||||
}
|
||||
|
||||
pre_check() {
|
||||
# test resolves hostname
|
||||
cp /etc/hosts ./hosts
|
||||
printf '# +++ xbps-src +++ required for lsof tests\n127.0.0.100 %s\n' "$(hostname)" >> /etc/hosts
|
||||
# write current config to test db
|
||||
cd tests && ./Add2TestDB
|
||||
}
|
||||
do_check() {
|
||||
make -C tests
|
||||
}
|
||||
post_check() {
|
||||
# cleanup polluted hosts file
|
||||
mv ./hosts /etc/hosts
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin lsof
|
||||
vman Lsof.8
|
||||
vlicense ${FILESDIR}/license.txt
|
||||
vman Lsof.8 lsof.8
|
||||
|
||||
# extract license from readme
|
||||
sed -n 00README -e '/^License/,/\*\/$/p' > License
|
||||
vlicense License
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue