summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD39
-rw-r--r--dattobd.install22
3 files changed, 48 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b856c289e2ac..9fcc307adf4d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = dattobd
pkgdesc = kernel module for taking block-level snapshots and incremental backups of Linux block devices
- pkgver = 20150805
+ pkgver = r1.8057a30
pkgrel = 1
url = https://github.com/datto/dattobd
+ install = dattobd.install
arch = any
license = GPL2
+ makedepends = linux-headers
source = git://github.com/datto/dattobd.git
- source = http://www.imegumii.nl/dattobd.conf
- md5sums = SKIP
md5sums = SKIP
pkgname = dattobd
diff --git a/PKGBUILD b/PKGBUILD
index 55f87a6778c2..c75ebb986d48 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,36 @@
# Maintainer: Yorick Rommers <yorick-rommers@hotmail.com>
+# Contributor: Josh VanderLinden <arch@cloudlery.com>
pkgname=dattobd
-pkgver=20150805
+pkgver=r1.8057a30
pkgrel=1
pkgdesc="kernel module for taking block-level snapshots and incremental backups of Linux block devices"
arch=('any')
url="https://github.com/datto/dattobd"
license=('GPL2')
-depends=('')
-source=("git://github.com/datto/dattobd.git"
- "http://www.imegumii.nl/dattobd.conf")
-md5sums=("SKIP"
- "SKIP")
+makedepends=("linux-headers")
+source=("git://github.com/datto/dattobd.git")
+md5sums=("SKIP")
+install=dattobd.install
+
+pkgver() {
+ cd "${pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
build() {
- cd "$srcdir/$pkgname"
- sudo make
+ cd "${srcdir}/${pkgname}"
+ make PREFIX="${pkgdir}/usr"
}
package() {
- cd "$srcdir/$pkgname"
- sudo make install
- sudo install -D "src/dattobd.ko" "/usr/lib/modules//$(uname -r)/"
- sudo install -D "../dattobd.conf" "/etc/modules-load.d/"
- sudo rm -f "src/.tmp_versions/dattobd.mod"
- sudo depmod -a
- sudo modprobe dattobd
-}
+ cd "${srcdir}/${pkgname}"
+
+ msg "Removing ldconfig lines"
+ find . -type f -name Makefile -exec sed -i '/ldconfig/d' {} \;
+ install -dm755 "${pkgdir}/usr/lib"
+ make PREFIX="${pkgdir}/usr" install
+ echo "$pkgdir"
+ install -Dm644 "src/dattobd.ko" "${pkgdir}/usr/lib/modules/$(uname -r)/dattobd.ko"
+}
diff --git a/dattobd.install b/dattobd.install
new file mode 100644
index 000000000000..95d30504d88b
--- /dev/null
+++ b/dattobd.install
@@ -0,0 +1,22 @@
+## arg 1: the new package version
+post_install() {
+ ldconfig
+ cat <<EOT
+You may load the dattobd kernel driver using the following commands:
+
+ depmod -a
+ modprobe dattobd
+
+If you wish for this driver to be loaded automatically when you reboot, you may
+do so using the following command:
+
+ echo dattobd > /etc/modules-load.d/dattobd.conf
+
+EOT
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install
+} \ No newline at end of file