luacrypto: refactor with autotools
authorFrancois Perrad <fperrad@gmail.com>
Sun, 15 Sep 2013 15:40:37 +0000 (17:40 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 17 Sep 2013 21:13:54 +0000 (23:13 +0200)
some CMake stuff comes from LuaDist, but CMake is not the primary build infrastructure of LuaCrypto.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/luacrypto/Config.in
package/luacrypto/luacrypto-01-autotools.patch [new file with mode: 0644]
package/luacrypto/luacrypto.mk

index f4587c30f7263b7a85aebfbf3c19e5636a31a202..8d13eec6b581f132f4b47e419851aa398ec6ec62 100644 (file)
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_LUACRYPTO
        bool "luacrypto"
        select BR2_PACKAGE_OPENSSL
-       select BR2_PACKAGE_LUASOCKET
        help
          LuaCrypto provides a Lua frontend to the OpenSSL cryptographic
          library.
diff --git a/package/luacrypto/luacrypto-01-autotools.patch b/package/luacrypto/luacrypto-01-autotools.patch
new file mode 100644 (file)
index 0000000..e8befb0
--- /dev/null
@@ -0,0 +1,30 @@
+autotools: fix install directories
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,7 +3,7 @@
+ SUBDIRS = src \
+         doc
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(prefix)/lib/pkgconfig
+ pkgconfig_DATA = luacrypto.pc
+ test: all
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,7 +31,7 @@
+ PKG_CHECK_MODULES([LUA], [lua])
+ # lua libdir
+-LUALIBDIR="`$PKGCONFIG --variable=libdir lua`"
++LUALIBDIR="`$PKGCONFIG --variable=INSTALL_CMOD lua`"
+ # dest of headers
+ CRYPTOINC="${includedir}/${PACKAGE_NAME}"
index ca57c65857cda93733bb55c348371c4c8856c46d..f6fcc787e17278889fb479942bde26fa504727d9 100644 (file)
@@ -8,7 +8,7 @@ LUACRYPTO_VERSION = 0.3.2
 LUACRYPTO_SITE = http://github.com/mkottman/luacrypto/tarball/$(LUACRYPTO_VERSION)
 LUACRYPTO_LICENSE = MIT
 LUACRYPTO_LICENSE_FILES = COPYING
-LUACRYPTO_DEPENDENCIES = lua openssl
-LUACRYPTO_CONF_OPT = "-DLUA_LIBRARIES=\"$(STAGING_DIR)/usr/lib/liblua.so\""
+LUACRYPTO_DEPENDENCIES = lua openssl host-pkgconf
+LUACRYPTO_AUTORECONF = YES
 
-$(eval $(cmake-package))
+$(eval $(autotools-package))