summaryrefslogtreecommitdiffstats
path: root/rules/lsof.make
blob: 828967d9ba26b9fc52bdda6f4bbc1c39031091f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# -*-makefile-*-
#
# Copyright (C) 2009 by Marc Kleine-Budde <mkl@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_LSOF) += lsof

#
# Paths and names
#
LSOF_VERSION	:= 4.81.dfsg.1
LSOF_MD5	:= 138b628cb1b6a3b16b32b792f77abcce
LSOF_SUFFIX	:= tar.gz
LSOF		:= lsof-$(LSOF_VERSION)
LSOF_TARBALL	:= lsof_$(LSOF_VERSION).orig.$(LSOF_SUFFIX)
LSOF_URL	:= http://snapshot.debian.org/archive/debian/20090218T214238Z/pool/main/l/lsof/$(LSOF_TARBALL)
LSOF_SOURCE	:= $(SRCDIR)/$(LSOF_TARBALL)
LSOF_DIR	:= $(BUILDDIR)/$(LSOF)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

LSOF_PATH	:= PATH=$(CROSS_PATH)

LSOF_ENV 	:= \
	$(CROSS_ENV) \
	LINUX_HASSELINUX=N \
	LSOF_AR="$(CROSS_AR) cr"

LSOF_MAKEVARS	:= \
	$(CROSS_ENV_CC) \
	LSOF_USER=none \
	DEBUG=-O2 \
	RANLIB="$(CROSS_RANLIB) liblsof.a"

#
# autoconf
#
LSOF_AUTOCONF := -n linux

$(STATEDIR)/lsof.prepare:
	@$(call targetinfo)
	cd $(LSOF_DIR) && \
		$(LSOF_PATH) $(LSOF_ENV) \
		./Configure $(LSOF_AUTOCONF)
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/lsof.install:
	@$(call targetinfo)
	install -D -m 755 "$(LSOF_DIR)/lsof" "$(LSOF_PKGDIR)/usr/bin/lsof"
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/lsof.targetinstall:
	@$(call targetinfo)

	@$(call install_init, lsof)
	@$(call install_fixup, lsof,PRIORITY,optional)
	@$(call install_fixup, lsof,SECTION,base)
	@$(call install_fixup, lsof,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
	@$(call install_fixup, lsof,DESCRIPTION,missing)

	@$(call install_copy, lsof, 0, 0, 0755, -, /usr/bin/lsof)

	@$(call install_finish, lsof)

	@$(call touch)

# vim: syntax=make