packages/rem: add (thanks to Alfred E. Heggestad)
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 4 Nov 2011 22:12:39 +0000 (22:12 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 4 Nov 2011 22:12:39 +0000 (22:12 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28755 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/rem/Makefile [new file with mode: 0644]

diff --git a/libs/rem/Makefile b/libs/rem/Makefile
new file mode 100644 (file)
index 0000000..e65979c
--- /dev/null
@@ -0,0 +1,61 @@
+# 
+# Copyright (C) 2010-2011 OpenWrt.org
+# Copyright (C) 2010 Alfred E. Heggestad
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rem
+PKG_VERSION:=0.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.creytiv.com/pub
+PKG_MD5SUM:=54022d8819c706ea460f6da9b5121ee4
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/librem
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libre +libpthread
+  TITLE:=Audio and video processing media library
+  URL:=http://www.creytiv.com/
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
+               LIBRE_INC=$(STAGING_DIR)/usr/include/re \
+               LIBRE_SO=$(STAGING_DIR)/usr/lib \
+               CC="$(TARGET_CC)" \
+               EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
+               EXTRA_LFLAGS="-lm" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               SYSROOT="$(TOOLCHAIN_DIR)" \
+               SYSROOT_ALT="$(STAGING_DIR)/usr" \
+               RELEASE=1 \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               OS=linux \
+               all install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/rem $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.{a,so} $(1)/usr/lib/
+endef
+
+define Package/librem/install
+       ln -sf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.so $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,librem))