[packages] add kamailio (former openser)
[openwrt/svn-archive/archive.git] / utils / pcsc-lite / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=pcsc-lite
4 PKG_VERSION:=1.5.5
5 PKG_RELEASE:=2
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
8 PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3082
9 PKG_MD5SUM:=6707e967fc8bb398a5d1b1089d4dff63
10
11 include $(INCLUDE_DIR)/package.mk
12
13 define Package/pcsc-lite/Default
14 SECTION:=utils
15 CATEGORY:=Utilities
16 TITLE:=Middleware to access a smart card using SCard API (PC/SC).
17 URL:=http://pcsclite.alioth.debian.org/
18 endef
19
20 define Package/pcsc-lite/Default/description
21 The purpose of PC/SC Lite is to provide a Windows(R) SCard
22 interface in a very small form factor for communicating to
23 smart cards and smart cards readers.
24 endef
25
26 define Package/libpcsclite
27 $(call Package/pcsc-lite/Default)
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE+= (library)
31 DEPENDS:=+libusb +libpthread
32 endef
33
34 define Package/libpcsclite/description
35 $(call Package/pcsc-lite/Default/description)
36 .
37 This package contains the PC/SC shared library.
38 endef
39
40 define Package/pcscd
41 $(call Package/pcsc-lite/Default)
42 SECTION:=utils
43 CATEGORY:=Utilities
44 TITLE+= (daemon)
45 DEPENDS:=+libpcsclite
46 endef
47
48 define Package/pcscd/description
49 $(call Package/pcsc-lite/Default/description)
50 .
51 This package contains the PC/SC daemon.
52 endef
53
54 TARGET_CFLAGS += $(FPIC)
55 TARGET_LDFLAGS += -lpthread
56
57 define Build/Configure
58 $(call Build/Configure/Default, \
59 --disable-libhal \
60 --enable-libusb \
61 --enable-usbdropdir=/usr/lib/pcsc/drivers \
62 )
63 endef
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 endef
70
71 define Build/InstallDev
72 $(INSTALL_DIR) $(1)/usr/include/PCSC
73 $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
76 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
78 endef
79
80 define Package/libpcsclite/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
83 endef
84
85 define Package/pcscd/conffiles
86 /etc/reader.conf.d/reader.conf
87 endef
88
89 define Package/pcscd/install
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
92 $(INSTALL_DIR) $(1)/etc/init.d
93 $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/update-reader.conf $(1)/usr/sbin/
95 $(INSTALL_DIR) $(1)/etc/reader.conf.d
96 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/reader.conf.d/reader.conf $(1)/etc/reader.conf.d/
97 endef
98
99 $(eval $(call BuildPackage,libpcsclite))
100 $(eval $(call BuildPackage,pcscd))