diff options
Diffstat (limited to 'pkgs/social/diaspora-git/PKGBUILD')
-rw-r--r-- | pkgs/social/diaspora-git/PKGBUILD | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/pkgs/social/diaspora-git/PKGBUILD b/pkgs/social/diaspora-git/PKGBUILD new file mode 100644 index 0000000..357a25d --- /dev/null +++ b/pkgs/social/diaspora-git/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer: fauno <fauno@kiwwwi.com.ar> +# Maintainer: Hilton Medeiros <medeiros.hilton at gmail dot com> +# Contributor: Splashy <splash at open-web dot fr> + +# After installing, see the Diaspora wiki page for more information: +# https://wiki.archlinux.org/index.php/Diaspora + +pkgname=diaspora-git +pkgver=20110122 +pkgrel=2 +pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network" +arch=('i686' 'x86_64') +url="http://www.joindiaspora.com/" +license=('AGPL3') +depends=('ruby' 'mysql-ruby' 'redis' 'imagemagick' 'libxslt') +makedepends=('git') +install=diaspora.install +source=('diaspora.bin' + 'diaspora.rc' + 'diaspora.logrotate' + 'diaspora.pam') + +_gitroot="git://github.com/diaspora/diaspora.git" +_gitname="diaspora" + +build() { + cd "$srcdir" + + msg "Connecting to the Git server..." + + if [[ -d $_gitname ]] ; then + pushd $_gitname + git pull origin + msg "The local files are updated." + popd + else + git clone $_gitroot + msg "Git clone done." + fi + + msg "Start making..." + + [[ -d $_gitname-build ]] && rm -fr $_gitname-build + git clone $_gitname $_gitname-build + + # Recover gems cache + rm -fr $_gitname-gems + mkdir -p $_gitname-gems + [[ -d cache ]] && mv cache $_gitname-gems + + # Install *all* gems + export GEM_HOME="$srcdir/$_gitname-gems" + export GEM_PATH="$srcdir/$_gitname-gems" + + gem install bundler + + # Patch ruby_core_source to not install the headers in the system + # Remove this if you are behind a proxy and install the ruby-headers package instead + gem install ruby_core_source + sed -i "s@^ dest_dir.*@ dest_dir = \"$srcdir/rubyhdrs/\" + ruby_dir@" \ + $_gitname-gems/gems/ruby_core_source*/lib/ruby_core_source.rb + + pushd $_gitname-build + bundle install + + # We make this now because we do not install the git history + tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'` + + rm -fr .git + popd + + # Keep the gems cache + mv $_gitname-gems/cache "$srcdir" +} + +package() { + cd "$srcdir" + + usrdir="$pkgdir/usr/share/webapps" + + install -d "$usrdir" + cp -r $_gitname-build "$usrdir/$_gitname" + cp -r $_gitname-gems "$usrdir/" + find "$usrdir/$_gitname-gems" \ + -type d -name ".git" -exec rm -fr '{}' \; &>/dev/null || true + + install -Dm755 $_gitname.bin "$pkgdir/usr/bin/$_gitname" + install -Dm755 $_gitname.rc "$pkgdir/etc/rc.d/$_gitname" + install -Dm644 $_gitname.logrotate "$pkgdir/etc/logrotate.d/$_gitname" + install -Dm644 $_gitname.pam "$pkgdir/etc/pam.d/$_gitname" + + install -dm755 $pkgdir/usr/share/licenses/$_gitname/ + install -Dm644 $_gitname-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \ + $pkgdir/usr/share/licenses/$_gitname/ +} +md5sums=('7e7402127f9a05bc58aff0adc5057d1c' + '7bffaaee41b515247ba19a19c77dc5bf' + '60f6b3972c73cbc6b1c9ab87c88fb655' + '96f82c38f3f540b53f3e5144900acf17') |