summaryrefslogtreecommitdiffstats
path: root/rules/pcsc-lite.make
blob: 2e0357cbc15c2ae65ac2ac10745e40d4db94a4b9 (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
# -*-makefile-*-
#
# Copyright (C) 2010 by Michael Olbrich <m.olbrich@pengutronix.de>
#               2015 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_PCSC_LITE) += pcsc-lite

#
# Paths and names
#
PCSC_LITE_VERSION	:= 1.8.14
PCSC_LITE_MD5		:= 439b2c8892f502e39e5b8997a7ae01ed
PCSC_LITE		:= pcsc-lite-$(PCSC_LITE_VERSION)
PCSC_LITE_SUFFIX	:= tar.bz2
PCSC_LITE_URL		:= https://alioth.debian.org/frs/download.php/file/4138/$(PCSC_LITE).$(PCSC_LITE_SUFFIX)
PCSC_LITE_SOURCE	:= $(SRCDIR)/$(PCSC_LITE).$(PCSC_LITE_SUFFIX)
PCSC_LITE_DIR		:= $(BUILDDIR)/$(PCSC_LITE)
PCSC_LITE_BUILD_OOT	:= YES
# src/spy LICENSE := GPL-3.0+ - but file is not distributed
PCSC_LITE_LICENSE	:= BSD-3-Clause AND BSD-2-Clause AND MIT AND ISC

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

#
# autoconf
#
PCSC_LITE_CONF_TOOL := autoconf
PCSC_LITE_CONF_OPT := \
	$(CROSS_AUTOCONF_USR) \
	--$(call ptx/endis, PTXCONF_PCSC_LITE_LIBUDEV)-libudev \
	--disable-libusb \
	--enable-usbdropdir=/usr/lib/pcsc \
	--$(call ptx/endis, PTXCONF_PCSC_LITE_DEBUGATR)-debugatr \
	--with-systemdsystemunitdir=/lib/systemd/system

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

$(STATEDIR)/pcsc-lite.targetinstall:
	@$(call targetinfo)

	@$(call install_init,  pcsc-lite)
	@$(call install_fixup, pcsc-lite,PRIORITY,optional)
	@$(call install_fixup, pcsc-lite,SECTION,base)
	@$(call install_fixup, pcsc-lite,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
	@$(call install_fixup, pcsc-lite,DESCRIPTION,missing)

	@$(call install_alternative, pcsc-lite, 0, 0, 0644, /etc/reader.conf.d/reader.conf)

	@$(call install_lib, pcsc-lite, 0, 0, 0644, libpcsclite)
	@$(call install_copy, pcsc-lite, 0, 0, 0755, -, /usr/sbin/pcscd)

ifdef PTXCONF_PCSC_LITE_SYSTEMD_UNIT
	@$(call install_alternative, pcsc-lite, 0, 0, 0644, /lib/systemd/system/pcscd.service)
	@$(call install_alternative, pcsc-lite, 0, 0, 0644, /lib/systemd/system/pcscd.socket)
	@$(call install_link, pcsc-lite, ../pcscd.socket, \
		/lib/systemd/system/sockets.target.wants/pcscd.socket)
endif

	@$(call install_finish, pcsc-lite)

	@$(call touch)

# vim: syntax=make