Skip to content

Commit

Permalink
Borgbackup (SynoCommunity#2694)
Browse files Browse the repository at this point in the history
* borgbackup package and its dependencies

* Add borgmatic to borgbackup package
  • Loading branch information
yuroller authored and KaraokeStu committed Mar 4, 2017
1 parent c8eddcb commit 464cd2f
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 2 deletions.
21 changes: 21 additions & 0 deletions cross/acl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PKG_NAME = acl
PKG_VERS = 2.2.52
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).src.$(PKG_EXT)
PKG_DIST_SITE = http://download.savannah.gnu.org/releases/acl
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/attr

HOMEPAGE = http://kernel.org/
COMMENT =
LICENSE =

GNU_CONFIGURE = 1
INSTALL_TARGET = myInstall

include ../../mk/spksrc.cross-cc.mk

.PHONY: myInstall
myInstall:
$(RUN) $(MAKE) DIST_ROOT=$(INSTALL_DIR) install install-lib install-dev
7 changes: 7 additions & 0 deletions cross/acl/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bin:bin/chacl
bin:bin/getfacl
bin:bin/setfacl
lnk::libexec/libacl.so
lnk:lib/libacl .so
lnk:lib/libacl.so.1
lib:lib/libacl.so.1.1.0
3 changes: 3 additions & 0 deletions cross/acl/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acl-2.2.52.src.tar.gz SHA1 537dddc0ee7b6aa67960a3de2d36f1e2ff2059d9
acl-2.2.52.src.tar.gz SHA256 179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23
acl-2.2.52.src.tar.gz MD5 a61415312426e9c2212bd7dc7929abda
11 changes: 11 additions & 0 deletions cross/acl/patches/shell.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- m4/libtool.m4.old 2011-04-19 19:55:48.000000000 +0200
+++ m4/libtool.m4 2013-02-21 23:10:02.000000000 +0100
@@ -94,7 +94,7 @@
LIBTOOL_DEPS="$ltmain"

# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIBTOOL='/bin/bash $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl

_LT_SETUP
17 changes: 17 additions & 0 deletions cross/borgbackup/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PKG_NAME = borgbackup
PKG_VERS = 1.0.10
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/b/$(PKG_NAME)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/acl cross/lz4 cross/openssl

HOMEPAGE = https://borgbackup.readthedocs.io/
COMMENT = Deduplicating backup program with compression and authenticated encryption
LICENSE = Borg

ENV += BORG_LZ4_PREFIX="$(STAGING_INSTALL_PREFIX)" BORG_OPENSSL_PREFIX="$(STAGING_INSTALL_PREFIX)"

include ../../mk/spksrc.python-wheel.mk

Empty file added cross/borgbackup/PLIST
Empty file.
3 changes: 3 additions & 0 deletions cross/borgbackup/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
borgbackup-1.0.10.tar.gz SHA1 d7c021f6595770e6d79fc9741d6505d6cf16d0a6
borgbackup-1.0.10.tar.gz SHA256 978f28f144924005219da989b1b436a32b2735a34c6d0dc15bb0a1ccffad59e9
borgbackup-1.0.10.tar.gz MD5 210cebe28da0cdce23a49a4f2102d9be
22 changes: 22 additions & 0 deletions cross/lz4/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PKG_NAME = lz4
PKG_VERS = 1.7.5
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/lz4/lz4/archive/
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://github.com/lz4/lz4
COMMENT = LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU.
LICENSE = BSD

CONFIGURE_TARGET = nop
INSTALL_TARGET = myInstall

include ../../mk/spksrc.cross-cc.mk

.PHONY: myInstall
myInstall:
$(RUN) $(MAKE) install PREFIX=$(STAGING_INSTALL_PREFIX)

3 changes: 3 additions & 0 deletions cross/lz4/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/liblz4.so
lnk:lib/liblz4.so.1
lib:lib/liblz4.so.1.7.5
3 changes: 3 additions & 0 deletions cross/lz4/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
v1.7.5.tar.gz SHA1 a710a7d45beb0951806d2b98f0c1739107e97c14
v1.7.5.tar.gz SHA256 0190cacd63022ccb86f44fa5041dc6c3804407ad61550ca21c382827319e7e7e
v1.7.5.tar.gz MD5 c9610c5ce97eb431dddddf0073d919b9
27 changes: 27 additions & 0 deletions spk/borgbackup/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SPK_NAME = borgbackup
SPK_VERS = 1.0.10
SPK_REV = 2
SPK_ICON = src/$(SPK_NAME).png

BUILD_DEPENDS = cross/python3 cross/setuptools cross/pip cross/wheel
BUILD_DEPENDS += cross/$(SPK_NAME)
DEPENDS = cross/bash
WHEELS = src/requirements.txt
SPK_DEPENDS = "python3>=3.5.2-6"

MAINTAINER = SynoCommunity
DESCRIPTION = Deduplicating backup program with compression and authenticated encryption.
STARTABLE = no
DISPLAY_NAME = Borg
CHANGELOG = "1. First release<br>2. Add borgmatic"
BETA = 1

HOMEPAGE = https://borgbackup.readthedocs.io
LICENSE = Borg

INSTALLER_SCRIPT = src/installer.sh
SSS_SCRIPT = src/dsm-control.sh

INSTALL_PREFIX = /usr/local/$(SPK_NAME)

include ../../mk/spksrc.spk.mk
1 change: 1 addition & 0 deletions spk/borgbackup/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rsc:share/wheelhouse
Binary file added spk/borgbackup/src/borgbackup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions spk/borgbackup/src/dsm-control.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# Package
PACKAGE="borgbackup"
DNAME="Borg"

# Others
INSTALL_DIR="/usr/local/${PACKAGE}"


case $1 in
start)
exit 0
;;
stop)
exit 0
;;
status)
exit 0
;;
log)
exit 1
;;
*)
exit 1
;;
esac
58 changes: 58 additions & 0 deletions spk/borgbackup/src/installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

# Package
PACKAGE="borgbackup"
DNAME="Borg"

# Others
INSTALL_DIR="/usr/local/${PACKAGE}"
PYTHON_DIR="/usr/local/python3"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
PATH="${INSTALL_DIR}/env/bin:${INSTALL_DIR}/bin:${PYTHON_DIR}/bin:${PATH}"

preinst ()
{
exit 0
}

postinst ()
{
# Link
ln -s ${SYNOPKG_PKGDEST} ${INSTALL_DIR}

# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${INSTALL_DIR}/env > /dev/null

# Install the wheels
${INSTALL_DIR}/env/bin/pip install --no-deps --no-index -U --force-reinstall -f ${INSTALL_DIR}/share/wheelhouse ${INSTALL_DIR}/share/wheelhouse/*.whl > /dev/null 2>&1

# Add symlink
mkdir -p /usr/local/bin
ln -s ${INSTALL_DIR}/env/bin/borg /usr/local/bin/borg
ln -s ${INSTALL_DIR}/env/bin/borgmatic /usr/local/bin/borgmatic

exit 0
}

preuninst ()
{
exit 0
}

postuninst ()
{
# Remove link
rm -f ${INSTALL_DIR}
rm -f /usr/local/bin/borg
exit 0
}

preupgrade ()
{
exit 0
}

postupgrade ()
{
exit 0
}
6 changes: 6 additions & 0 deletions spk/borgbackup/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Cross compiled packages dependencies
#borgbackup==1.0.10
#msgpack-python==0.4.8

# Downloaded dependencies
borgmatic==1.0.3
5 changes: 3 additions & 2 deletions spk/python3/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SPK_NAME = python3
SPK_SHORT_VERS = 3.5
SPK_VERS = $(SPK_SHORT_VERS).2
SPK_REV = 5
SPK_REV = 6
SPK_ICON = src/python3.png

DEPENDS = cross/busybox cross/$(SPK_NAME)
Expand All @@ -10,6 +10,7 @@ DEPENDS += cross/setuptools cross/pip cross/wheel
DEPENDS += cross/cffi cross/cryptography cross/bcrypt
# Cross-compiled wheels
DEPENDS += cross/lxml cross/pycrypto cross/pycurl cross/pyyaml
DEPENDS += cross/msgpack-python cross/attr cross/acl cross/lz4

WHEELS = src/requirements.txt

Expand All @@ -20,7 +21,7 @@ DESCRIPTION_SPN = Lenguaje de programación Python.
RELOAD_UI = yes
STARTABLE = no
DISPLAY_NAME = Python3
CHANGELOG = "1. Update to Python 3.5.2<br>2. Update modules"
CHANGELOG = "1. Update to Python 3.5.2<br>2. Update modules<br>3. Added msgpack libattr libacl liblz4"

HOMEPAGE = http://www.python.org
LICENSE = PSF
Expand Down

0 comments on commit 464cd2f

Please sign in to comment.