From c446363a3832f10a1ed928d1eec5208524be89be Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Wed, 19 Jun 2013 07:13:17 -0400 Subject: [PATCH] Add seafile.install to git and PKGBUILD --- PKGBUILD | 8 +++++--- seafile.install | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100755 seafile.install diff --git a/PKGBUILD b/PKGBUILD index 18ae7fb..f70c710 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -7,7 +7,7 @@ pkgname=seafile pkgver=1.7.0 #The release number for the arch package, as fixes are added to the PKGBUILD, the release number will increase -pkgrel=1 +pkgrel=2 # The description of the package, should be about 80 characters long (one line) pkgdesc="Seafile is an open-source Dropbox replacement." @@ -41,9 +41,11 @@ options= install=seafile.install source=("https://seafile.googlecode.com/files/seafile-1.7.0.tar.gz" - "seafile-admin.patch") + "seafile-admin.patch" + "seafile.install") sha256sums=('909b1674acf8da74a4131d7cc9f2e39f0dcf53df1b2338df719365028ae59b23' - '0d9578b85c00f3087a19f227b29c3fda13e83d093d024c68c1df5575d30d56dc') + '0d9578b85c00f3087a19f227b29c3fda13e83d093d024c68c1df5575d30d56dc' + 'ce0cbf29b87e29709c6f7a1e6558a6c22d5aa24d41a9ed5b1dd44eab15c4d45c') prepare () { cd "$srcdir/$pkgname-$pkgver" diff --git a/seafile.install b/seafile.install new file mode 100755 index 0000000..830a1d5 --- /dev/null +++ b/seafile.install @@ -0,0 +1,41 @@ +## arg 1: the new package version +pre_install() { + virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv + virtualenv2 --relocatable /usr/lib/seafile/seafileenv + source /usr/lib/seafile/seafileenv/bin/activate + pip install django==1.3.1 + pip install djangorestframework + deactivate +} + +#pacman complains if these functions don't exist, so we might as well +#appease it. + +## arg 1: the new package version +post_install() { + echo " " > /dev/null +} + +## arg 1: the new package version +## arg 2: the old package version +pre_upgrade() { + echo " " > /dev/null +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + echo " " > /dev/null +} + +## arg 1: the old package version +pre_remove() { + echo " " > /dev/null +} + +## arg 1: the old package version +post_remove() { + rm -rf /usr/lib/seafile/seafileenv +} + +# vim:set ts=2 sw=2 et: