treewide: remove AUTORELEASE
[feed/packages.git] / libs / libftdi / Makefile
1 #
2 # Copyright (C) 2011-2015 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:=libftdi
11 PKG_VERSION:=0.20
12 PKG_RELEASE:=7
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
16 PKG_HASH:=3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e
17
18 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
19 PKG_LICENSE:=LGPL-2.0
20 PKG_LICENSE_FILES:=COPYING.LIB
21
22 CMAKE_INSTALL:=1
23 PKG_BUILD_FLAGS:=no-mips16
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
27
28 define Package/libftdi
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libusb-compat
32 TITLE:=Library to talk to FTDI chips
33 URL:=http://www.intra2net.com/en/developer/libftdi/
34 endef
35
36 define Package/libftdi/description
37 libFTDI - FTDI USB driver with bitbang mode
38 libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
39 The library is linked with your program in userspace, no kernel driver required.
40 endef
41
42 CMAKE_OPTIONS += \
43 -DBoost_NO_BOOST_CMAKE=ON \
44 -DEXAMPLES=OFF
45
46 define Build/InstallDev
47 $(call Build/InstallDev/cmake,$(1))
48 $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdi.pc
49 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdi.pc
50 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdi.pc
51 $(SED) 's,/usr/bin,/usr,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
52 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
53 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libftdipp.pc
54 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/libftdi-config
55 $(INSTALL_DIR) $(2)/bin
56 $(LN) ../../usr/bin/libftdi-config $(2)/bin/libftdi-config
57 endef
58
59 define Package/libftdi/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libftdi-config $(1)/usr/bin/
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libftdi))