[packages] add libqrencode
[openwrt/svn-archive/archive.git] / libs / qrencode / Makefile
1 #
2 # Copyright (C) 2006-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:=qrencode
11 PKG_VERSION:=3.4.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
16 PKG_MD5SUM:=2bb7fb7c7bd1a4042d4910b29609319e
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libqrencode
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=Library for encoding data in a QR Code symbol
24 URL:=http://fukuchi.org/works/qrencode/
25 endef
26
27 define Package/libqrencode/description
28 Libqrencode is a C library for encoding data in a QR Code symbol,
29 a kind of 2D symbology that can be scanned by handy terminals such
30 as a mobile phone with CCD. The capacity of QR Code is up to 7000
31 digits or 4000 characters, and is highly robust.
32
33
34 endef
35
36 CONFIGURE_ARGS+= \
37 --enable-shared \
38 --enable-static \
39 --disable-rpath \
40 --disable-sdltest \
41 --without-tools \
42 --without-tests
43
44 TARGET_LDFLAGS+= -s
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 $(TARGET_CONFIGURE_OPTS) \
49 CFLAGS="$(TARGET_CFLAGS)" \
50 LDFLAGS="$(TARGET_LDFLAGS)" \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/qrencode.h $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.{a,so*} $(1)/usr/lib/
59 $(CP) $(PKG_BUILD_DIR)/libqrencode.pc $(1)/usr/lib/pkgconfig/
60 endef
61
62 define Package/libqrencode/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.so* $(1)/usr/lib/
65 endef
66
67 $(eval $(call BuildPackage,libqrencode))