Skip to content

Instantly share code, notes, and snippets.

@scola
Created January 22, 2014 14:33
Show Gist options
  • Save scola/8559665 to your computer and use it in GitHub Desktop.
Save scola/8559665 to your computer and use it in GitHub Desktop.
Makefile for liboauth-openwrt
include $(TOPDIR)/rules.mk
PKG_NAME:=liboauth
PKG_VERSION:=0.9.7
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://sourceforge.net/projects/liboauth/files/
#PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
PKG_CAT:=zcat
PKG_MAINTAINER:=Robin Gareus <[email protected]>
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/liboauth
SECTION:=libs
CATEGORY:=Libraries
DEFAULT:=y
DEPENDS:=+libopenssl +libcurl
TITLE:=liboauth is a collection of POSIX-c functions implementing the OAuth Core RFC 5849 standard
#DESCRIPTION:=This variable is obsolete. use the Package/name/description define instead!
URL:=http://liboauth.sourceforge.net/
endef
define Package/liboauth/description
liboauth is a collection of POSIX-c functions implementing the OAuth Core RFC 5849 standard
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboauth.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/oauth.pc $(1)/usr/lib/pkgconfig/
endef
define Package/liboauth/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboauth.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,liboauth))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment