qrencode: Update to 4.0.0
[feed/packages.git] / libs / qrencode / Makefile
1 #
2 # Copyright (C) 2006-2017 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:=4.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
16 PKG_HASH:=c90035e16921117d4086a7fdee65aab85be32beb4a376f6b664b8a425d327d0b
17 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
18 PKG_LICENSE:=LGPL-2.1+
19 PKG_INSTALL:=1
20 PKG_FIXUP:=autoreconf
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libqrencode
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Library for encoding data in a QR Code symbol
28 URL:=http://fukuchi.org/works/qrencode/
29 endef
30
31 define Package/libqrencode/description
32 Libqrencode is a C library for encoding data in a QR Code symbol,
33 a kind of 2D symbology that can be scanned by handy terminals such
34 as a mobile phone with CCD. The capacity of QR Code is up to 7000
35 digits or 4000 characters, and is highly robust.
36 endef
37
38 define Package/qrencode
39 SECTION:=utils
40 CATEGORY:=Utilities
41 TITLE:=qrencode binary for producing qr codes
42 URL:=http://fukuchi.org/works/qrencode/
43 DEPENDS:=+libqrencode
44 endef
45
46 define Package/qrencode/description
47 Qrencode is a C program for encoding data in a QR Code symbol,
48 a kind of 2D symbology that can be scanned by handy terminals such
49 as a mobile phone with CCD. The capacity of QR Code is up to 7000
50 digits or 4000 characters, and is highly robust.
51 endef
52
53
54 CONFIGURE_ARGS+= \
55 --enable-shared \
56 --enable-static \
57 --disable-rpath \
58 --disable-sdltest \
59 --without-tests \
60 --without-png
61
62 TARGET_LDFLAGS+= -s
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 $(TARGET_CONFIGURE_OPTS) \
67 CFLAGS="$(TARGET_CFLAGS)" \
68 LDFLAGS="$(TARGET_LDFLAGS)" \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/qrencode.h $(1)/usr/include/
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.{a,so*} $(1)/usr/lib/
77 $(CP) $(PKG_BUILD_DIR)/libqrencode.pc $(1)/usr/lib/pkgconfig/
78 endef
79
80 define Package/libqrencode/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.so* $(1)/usr/lib/
83 endef
84
85 define Package/qrencode/install
86 $(INSTALL_DIR) $(1)/usr/bin
87 $(CP) $(PKG_INSTALL_DIR)/usr/bin/qrencode $(1)/usr/bin/
88 endef
89
90 $(eval $(call BuildPackage,libqrencode))
91 $(eval $(call BuildPackage,qrencode))