summaryrefslogtreecommitdiff
path: root/community/libtrash
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/libtrash
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/libtrash')
-rw-r--r--community/libtrash/PKGBUILD35
-rw-r--r--community/libtrash/libtrash.install15
-rw-r--r--community/libtrash/libtrash.patch11
-rw-r--r--community/libtrash/libtrash.sh3
4 files changed, 64 insertions, 0 deletions
diff --git a/community/libtrash/PKGBUILD b/community/libtrash/PKGBUILD
new file mode 100644
index 000000000..b870d83ae
--- /dev/null
+++ b/community/libtrash/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 24969 2010-08-29 20:08:31Z jlichtblau $
+# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
+# Contributor: arjan <arjan@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=libtrash
+pkgver=3.2
+pkgrel=2
+pkgdesc="A shared, preloaded library that implements a trash can under Linux"
+arch=('i686' 'x86_64')
+url="http://pages.stern.nyu.edu/~marriaga/software/libtrash/"
+license=('GPL')
+depends=('glibc')
+makedepends=('patch' 'python')
+install=$pkgname.install
+source=(http://pages.stern.nyu.edu/~marriaga/software/libtrash/$pkgname-latest.tgz libtrash.patch libtrash.sh)
+md5sums=('147f645738088c83738259376737bc42'
+ '662e030819f2954b59e7646c77855f6c'
+ 'de716ae481adc8e88ddd32ea72808230')
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+
+ patch -Np1 -i $startdir/src/libtrash.patch
+
+ install -d ${pkgdir}/usr/lib ${pkgdir}/etc/profile.d
+ make INSTLIBDIR=${pkgdir}/usr/lib SYSCONFFILE=${pkgdir}/etc
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+
+ make INSTLIBDIR=${pkgdir}/usr/lib SYSCONFFILE=${pkgdir}/etc install
+ install -D -m 644 ${srcdir}/libtrash.sh ${pkgdir}/etc/profile.d/libtrash.sh
+}
diff --git a/community/libtrash/libtrash.install b/community/libtrash/libtrash.install
new file mode 100644
index 000000000..9b1d1db9d
--- /dev/null
+++ b/community/libtrash/libtrash.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo ">> To enable libtrash at login:"
+ echo ">> chmod 755 /etc/profile.d/libtrash.sh"
+ echo ">> To enable libtrash at any moment:"
+ echo ">> . /etc/profile.d/libtrash.sh"
+ echo ">> To disable libtrash at any moment:"
+ echo ">> unset LD_PRELOAD"
+ echo ">> WARNING: fakeroot will not work while libtrash is enabled."
+ echo ">> Disable libtrash before using fakeroot!"
+}
+
+post_upgrade() {
+ post_install
+}
+
diff --git a/community/libtrash/libtrash.patch b/community/libtrash/libtrash.patch
new file mode 100644
index 000000000..df08f9174
--- /dev/null
+++ b/community/libtrash/libtrash.patch
@@ -0,0 +1,11 @@
+diff -urN libtrash-2.1/src/Makefile libtrash-2.1-new/src/Makefile
+--- libtrash-2.1/src/Makefile 2003-06-24 16:35:25.000000000 -0700
++++ libtrash-2.1-new/src/Makefile 2003-07-13 01:35:35.000000000 -0700
+@@ -29,7 +29,6 @@
+ TRASH_OFF=YES install libtrash.so.${VERSION} ${INSTLIBDIR}/libtrash.so.${VERSION}
+ TRASH_OFF=YES ln -sf libtrash.so.${VERSION} ${INSTLIBDIR}/libtrash.so
+ TRASH_OFF=YES install libtrash.conf.sys --mode a=r ${SYSCONFFILE}
+- ldconfig
+
+ clean:
+ rm -f *~
diff --git a/community/libtrash/libtrash.sh b/community/libtrash/libtrash.sh
new file mode 100644
index 000000000..d2850a56e
--- /dev/null
+++ b/community/libtrash/libtrash.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+export LD_PRELOAD=/usr/lib/libtrash.so.3.2