Adds the patch to disable building the shared library.
[librecmc/package-feed.git] / utils / pcsc-lite / Makefile
1 #
2 # Copyright (C) 2009-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pcsc-lite
11 PKG_VERSION:=1.8.20
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4203
16 PKG_MD5SUM:=ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2
17 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/pcsc-lite/Default
27   TITLE:=Middleware to access a smart card using SCard API (PC/SC).
28   URL:=http://pcsclite.alioth.debian.org/
29 endef
30
31 define Package/pcsc-lite/Default/description
32   The purpose of PC/SC Lite is to provide a Windows(R) SCard
33   interface in a very small form factor for communicating to
34   smart cards and smart cards readers.
35 endef
36
37 define Package/libpcsclite
38   $(call Package/pcsc-lite/Default)
39   SECTION:=libs
40   CATEGORY:=Libraries
41   TITLE+= (library)
42   DEPENDS:=+libusb-1.0 +libpthread +librt
43 endef
44
45 define Package/libpcsclite/description
46   $(call Package/pcsc-lite/Default/description)
47   .
48   This package contains the PC/SC shared library.
49 endef
50
51 define Package/pcscd
52   $(call Package/pcsc-lite/Default)
53   SECTION:=utils
54   CATEGORY:=Utilities
55   TITLE+= (daemon)
56   DEPENDS:=+libpcsclite
57 endef
58
59 define Package/pcscd/description
60   $(call Package/pcsc-lite/Default/description)
61   .
62   This package contains the PC/SC daemon.
63 endef
64
65 TARGET_CFLAGS += $(FPIC)
66 TARGET_LDFLAGS += -lpthread
67
68 CONFIGURE_ARGS += \
69         --disable-libudev \
70         --enable-libusb \
71         --enable-static \
72         --enable-usbdropdir=/usr/lib/pcsc/drivers
73
74 define Build/InstallDev
75         $(INSTALL_DIR) $(1)/usr/include/PCSC
76         $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
77         $(INSTALL_DIR) $(1)/usr/lib
78         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
79         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
80         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
81 endef
82
83 define Package/libpcsclite/install
84         $(INSTALL_DIR) $(1)/usr/lib
85         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
86 endef
87
88 define Package/pcscd/conffiles
89 /etc/reader.conf.d/reader.conf
90 endef
91
92 define Package/pcscd/install
93         $(INSTALL_DIR) $(1)/usr/sbin
94         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
95         $(INSTALL_DIR) $(1)/etc/init.d
96         $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
97         $(INSTALL_DIR) $(1)/etc/reader.conf.d
98 endef
99
100 $(eval $(call BuildPackage,libpcsclite))
101 $(eval $(call BuildPackage,pcscd))