summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Reimer2015-06-08 11:08:22 +0200
committerChristopher Reimer2015-06-08 11:08:22 +0200
commit03f2cd80293132fab1942da51b3ce18beaff8b80 (patch)
treeba92965ab4e0c886ce901b60e7f1d669e5c8956d
downloadaur-03f2cd80293132fab1942da51b3ce18beaff8b80.tar.gz
Sync from VDR4Arch (https://github.com/VDR4Arch/vdr4arch/commit/3bf8a4492e3b973a559fd2c53855b231e25c7e74)
-rw-r--r--.SRCINFO25
-rw-r--r--50-undelete.conf54
-rw-r--r--PKGBUILD40
-rw-r--r--undelete-vdr2.1.2compat.diff78
4 files changed, 197 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..919fa3c97745
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = vdr-undelete
+ pkgdesc = allows to undelete accidentally deleted VDR recordings
+ pkgver = 0.0.7
+ pkgrel = 20
+ url = http://projects.vdr-developer.org/projects/plg-undelete
+ arch = x86_64
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ license = GPL2
+ depends = gcc-libs
+ depends = vdr-api=2.2.0
+ backup = etc/vdr/conf.avail/50-undelete.conf
+ source = http://projects.vdr-developer.org/attachments/download/1060/vdr-undelete-0.0.7.tgz
+ source = undelete-newmakefile-vdr-1.7.36.tgz::http://www.vdr-portal.de/index.php?page=Attachment&attachmentID=32684
+ source = undelete-vdr2.1.2compat.diff
+ source = 50-undelete.conf
+ md5sums = 667493335e0b1629e72de86a4cc7e558
+ md5sums = e3b79c3d5474e84bc5e7c624553f87a0
+ md5sums = 78999207fa6a1d3714d493d09cc096c2
+ md5sums = d37975ef3acb4bcf41c74e56606ad0c1
+
+pkgname = vdr-undelete
+
diff --git a/50-undelete.conf b/50-undelete.conf
new file mode 100644
index 000000000000..f14ce0e7941a
--- /dev/null
+++ b/50-undelete.conf
@@ -0,0 +1,54 @@
+[undelete]
+#--visible_in_mainmenu
+# Show the plugin in the mainmenu
+
+#--hide_in_mainmenu
+# Hide the plugin in the mainmenu. You can start the Plugin in the setupmenu
+
+#--mainmenu_name=Name
+# Select Name for entry in the mainmenu
+
+#--confirm_purge_rec
+# show confirmation for purge recording
+
+#--not_confirm_purge_rec
+# purge recording without confirmation
+
+#--confirm_purge_dir
+# show confirmation for purge directory
+
+#--not_confirm_purge_dir
+# purge directory without confirmation
+
+#--confirm_purge_all
+# show confirmation for purge all function
+
+#--not_confirm_purge_all
+# purge all function without confirmation\
+
+#--confirm_salvage_rec
+# show confirmation for salvage recording
+
+#--not_confirm_salvage_rec
+# salvage recording without confirmation
+
+#--confirm_salvage_dir
+# show confirmation for salvage directory
+
+#--not_confirm_salvage_dir
+# salvage directory without confirmation
+
+#--confirm_salvage_all
+# show confirmation for salvage all function
+
+#--not_confirm_salvage_all
+# salvage all function without confirmation
+
+#--verbose
+# Enable verbose logging
+
+#--noverbose
+# Disable verbose logging
+
+#--nosetup_commandline
+# Hide the 'Prefer Command Line Parameter from plugin setup
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2eb51e556ca7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# This PKGBUILD is part of the VDR4Arch project [https://github.com/vdr4arch]
+
+# Maintainer: Christopher Reimer <mail+vdr4arch[at]c-reimer[dot]de>
+pkgname=vdr-undelete
+pkgver=0.0.7
+_vdrapi=2.2.0
+pkgrel=20
+pkgdesc="allows to undelete accidentally deleted VDR recordings"
+url="http://projects.vdr-developer.org/projects/plg-undelete"
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
+license=('GPL2')
+depends=('gcc-libs' "vdr-api=${_vdrapi}")
+_plugname=$(echo $pkgname | sed 's/vdr-//g')
+source=("http://projects.vdr-developer.org/attachments/download/1060/$pkgname-$pkgver.tgz"
+ "undelete-newmakefile-vdr-1.7.36.tgz::http://www.vdr-portal.de/index.php?page=Attachment&attachmentID=32684"
+ 'undelete-vdr2.1.2compat.diff'
+ "50-$_plugname.conf")
+backup=("etc/vdr/conf.avail/50-$_plugname.conf")
+md5sums=('667493335e0b1629e72de86a4cc7e558'
+ 'e3b79c3d5474e84bc5e7c624553f87a0'
+ '78999207fa6a1d3714d493d09cc096c2'
+ 'd37975ef3acb4bcf41c74e56606ad0c1')
+
+prepare() {
+ cd "${srcdir}/${_plugname}-${pkgver}"
+ patch -p1 -i "$srcdir/undelete-vdr2.1.2compat.diff"
+ cp "$srcdir/undelete/Makefile" .
+}
+
+build() {
+ cd "${srcdir}/${_plugname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${_plugname}-${pkgver}"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 "$srcdir/50-$_plugname.conf" "$pkgdir/etc/vdr/conf.avail/50-$_plugname.conf"
+}
diff --git a/undelete-vdr2.1.2compat.diff b/undelete-vdr2.1.2compat.diff
new file mode 100644
index 000000000000..672ac9ba0fc0
--- /dev/null
+++ b/undelete-vdr2.1.2compat.diff
@@ -0,0 +1,78 @@
+diff -ruN undelete-0.0.7/menuundelete.c undelete-0.0.7.edit/menuundelete.c
+--- undelete-0.0.7/menuundelete.c 2012-09-29 00:12:22.000000000 +0200
++++ undelete-0.0.7.edit/menuundelete.c 2013-10-19 14:53:42.319679339 +0200
+@@ -109,7 +109,11 @@
+ if (isdir || Parent)
+ {
+ temp = strdup(filename);
++#if APIVERSNUM > 20101
++ char *last = temp + strlen(cVideoDirectory::Name()) + 1;
++#else
+ char *last = temp + strlen(VideoDirectory) + 1;
++#endif
+ for (int i = level; *last && i >= Parent ? -1 : 0; i--)
+ {
+ last = strchr(last, '/');
+@@ -635,7 +639,11 @@
+ {
+ if (verbose.u)
+ isyslog("%s: purge deleted recording (%s)", plugin_name, recording->FileName());
++#if APIVERSNUM > 20101
++ if (!cVideoDirectory::RemoveVideoFile(recording->FileName()))
++#else
+ if (!RemoveVideoFile(recording->FileName()))
++#endif
+ {
+ esyslog("%s: Error while remove deleted recording (%s)", plugin_name, recording->FileName());
+ processerror = true;
+@@ -669,7 +677,11 @@
+ processerror = true;
+ } else
+ {
++#if APIVERSNUM > 20101
++ if (!cVideoDirectory::RenameVideoFile(recording->FileName(), NewName))
++#else
+ if (!RenameVideoFile(recording->FileName(), NewName))
++#endif
+ {
+ esyslog("%s: Error while rename deleted recording (%s) to (%s)", plugin_name, recording->FileName(), NewName);
+ processerror = true;
+diff -ruN undelete-0.0.7/undelete.c undelete-0.0.7.edit/undelete.c
+--- undelete-0.0.7/undelete.c 2012-10-05 00:26:01.000000000 +0200
++++ undelete-0.0.7.edit/undelete.c 2013-10-19 14:52:08.418606971 +0200
+@@ -840,7 +840,11 @@
+ {
+ if (verbose.u)
+ isyslog("%s: purge deleted recording (%s)", plugin_name, recording->FileName());
++#if APIVERSNUM > 20101
++ if (!cVideoDirectory::RemoveVideoFile(recording->FileName()))
++#else
+ if (!RemoveVideoFile(recording->FileName()))
++#endif
+ {
+ esyslog("%s: Error while removing deleted recording (%s)", plugin_name, recording->FileName());
+ return cString::sprintf("error while purging the deleted recording \"%s\" [%s]", Option, recording->Title());
+@@ -952,7 +956,11 @@
+ return cString::sprintf("recording with the same name exists \"%s\" [%s]", Option, recording->Title());
+ } else
+ {
++#if APIVERSNUM > 20101
++ if (!cVideoDirectory::RenameVideoFile(recording->FileName(), (const char *)NewName))
++#else
+ if (!RenameVideoFile(recording->FileName(), (const char *)NewName))
++#endif
+ {
+ esyslog("%s: Error while renaming deleted recording (%s) to (%s)", plugin_name, recording->FileName(), (const char *)NewName);
+ return cString::sprintf("error while renaming deleted recording \"%s\" [%s]", Option, recording->Title());
+@@ -1069,7 +1077,11 @@
+ void cRemoveThread::Action(void)
+ {
+ d1syslogi("cRemoveThread::Action", "RemoveEmptyVideoDirectories thread started (pid=%d)", getpid());
++#if APIVERSNUM > 20101
++ cVideoDirectory::RemoveEmptyVideoDirectories();
++#else
+ RemoveEmptyVideoDirectories();
++#endif
+ d1syslogi("cRemoveThread::Action", "RemoveEmptyVideoDirectories thread ended (pid=%d)", getpid());
+ }
+