From 3eb27645ac81f39593ecf6120b8bf03a8bfcc474 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 14 Oct 2012 18:00:06 +0200 Subject: add lxc and attr packages --- package/attr/Makefile | 85 +++++++++++++++++++++++++++++++++ package/attr/patches/100-buildefs.patch | 11 +++++ package/lxc/Makefile | 61 +++++++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 package/attr/Makefile create mode 100644 package/attr/patches/100-buildefs.patch create mode 100644 package/lxc/Makefile diff --git a/package/attr/Makefile b/package/attr/Makefile new file mode 100644 index 000000000..a8ed6c3e3 --- /dev/null +++ b/package/attr/Makefile @@ -0,0 +1,85 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=attr +PKG_VERSION:=2.4.46 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz +PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/$(PKG_NAME)/ +PKG_MD5SUM:=db557c17fdfa4f785333ecda08654010 + +include $(INCLUDE_DIR)/package.mk + +MY_APPLETS:=setfattr getfattr attr + +define Package/attr/Default + SECTION:=utils + CATEGORY:=Utilities + URL:=http://savannah.nongnu.org/projects/attr +endef + +define Package/attr + $(call Package/attr/Default) + TITLE:=Extended attributes tools + MENU:=1 +endef + +define Package/libattr + $(call Package/attr/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Extended attributes library +endef + +define GenPlugin + define Package/$(1) + $(call Package/attr/Default) + DEPENDS:= attr +libattr + TITLE:=Utility $(2) from extended attributes tools + endef +endef + +$(foreach a,$(MY_APPLETS),$(eval $(call GenPlugin,attr-$(a),$(a)))) + +CONFIGURE_ARGS += --enable-shared --enable-static --disable-gettext + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) DIST_ROOT="$(PKG_INSTALL_DIR)" install install-lib install-dev +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) -r $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libattr.{a,so*} $(1)/usr/lib/ +endef + +define Package/attr/install + true +endef + +define Package/libattr/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libattr.so* $(1)/usr/lib/ +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/ + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,attr)) +$(eval $(call BuildPackage,libattr)) +$(foreach a,$(MY_APPLETS),$(eval $(call BuildPlugin,attr-$(a),$(a)))) diff --git a/package/attr/patches/100-buildefs.patch b/package/attr/patches/100-buildefs.patch new file mode 100644 index 000000000..3f9fc8fa5 --- /dev/null +++ b/package/attr/patches/100-buildefs.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -6681,7 +6681,7 @@ + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(CONFIG_SHELL) $(top_builddir)/libtool' + + + diff --git a/package/lxc/Makefile b/package/lxc/Makefile new file mode 100644 index 000000000..0c215011f --- /dev/null +++ b/package/lxc/Makefile @@ -0,0 +1,61 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lxc +PKG_VERSION:=0.7.5 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/lxc-$(PKG_VERSION) +PKG_SOURCE:=lxc-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://lxc.sourceforge.net/download/lxc/ +PKG_MD5SUM:=04949900ff56898f4353b130929c09d1 +PKG_CAT:=zcat + +include $(INCLUDE_DIR)/package.mk + +define Package/lxc + SECTION:=base + CATEGORY:=Utilities + DEFAULT:=y + TITLE:=LXC: Lightweight Containers Utilities + #DESCRIPTION:=This variable is obsolete. use the Package/name/description define instead! + URL:=http://lxc.sourceforge.net/ + DEPENDS:=+libattr +libcap +endef + +define Package/lxc/description + LXC: Lightweight Containers Utilities +endef + +CONFIGURE_ARGS += --enable-shared --enable-static --disable-gettext + +#MAKE_FLAGS+=\ +# CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ +# LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -lc" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CROSS)gcc" \ + AR="$(TARGET_CROSS)ar rcu" \ + RANLIB="$(TARGET_CROSS)ranlib" \ + INSTALL_ROOT=/usr \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -lc" \ + MYLDFLAGS="$(TARGET_LDFLAGS)" \ + PKG_VERSION=$(PKG_VERSION) + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + INSTALL_TOP="$(PKG_INSTALL_DIR)/usr" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/lxc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lxc-* $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblxc.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,lxc)) -- cgit v1.2.3