Skip to content

Instantly share code, notes, and snippets.

@trnila
Last active July 26, 2016 00:45
Show Gist options
  • Save trnila/5e4b854e34987489b98320cf83dcc2c2 to your computer and use it in GitHub Desktop.
Save trnila/5e4b854e34987489b98320cf83dcc2c2 to your computer and use it in GitHub Desktop.
Openwrt BUP package
# https://groups.google.com/d/msg/bup-list/HIeue2eiIKc/slcMnIywtoMJ
include $(TOPDIR)/rules.mk
PKG_NAME:=bup
PKG_VERSION:=0.28.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/bup/bup/archive/
include $(INCLUDE_DIR)/package.mk
define Package/bup
SUBMENU:=backup
SECTION:=utils
CATEGORY:=Utilities
TITLE:=bup
URL:=http://github.com/bup/bup
# DEPENDS:=+python
endef
define Package/bup/description
Bup - it backs things up!
endef
TARGET_CFLAGS=-I$(STAGING_DIR)/usr/include/python2.7/
define Build/Configure
endef
define Build/Compile
(cd $(PKG_BUILD_DIR) ; \
(cd config; PYTHON=/usr/bin/python ./configure) ; \
(cd lib/bup ; \
CC=$(TARGET_CC) \
CCSHARED=$(TARGET_CC) \
LDSHARED="$(TARGET_CC) -shared" \
CFLAGS=$(TARGET_CFLAGS) \
python csetup.py build ); \
cp lib/bup/build/*/_helpers.so lib/bup ; \
)
$(MAKE) -C $(PKG_BUILD_DIR) PREFIX=/usr DESTDIR=$(PKG_INSTALL_DIR) install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
endef
define Package/bup/install
$(INSTALL_DIR) $(1)
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
endef
$(eval $(call BuildPackage,bup))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment