[arch-commits] Commit in taskjuggler3 (4 files)
Maxime Gauduin
alucryd at nymeria.archlinux.org
Fri Sep 27 08:30:35 UTC 2013
Date: Friday, September 27, 2013 @ 10:30:34
Author: alucryd
Revision: 97684
archrelease: copy trunk to community-any
Added:
taskjuggler3/repos/
taskjuggler3/repos/community-any/
taskjuggler3/repos/community-any/PKGBUILD
(from rev 97683, taskjuggler3/trunk/PKGBUILD)
taskjuggler3/repos/community-any/tj-system-dirs.patch
(from rev 97683, taskjuggler3/trunk/tj-system-dirs.patch)
----------------------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
tj-system-dirs.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
Copied: taskjuggler3/repos/community-any/PKGBUILD (from rev 97683, taskjuggler3/trunk/PKGBUILD)
===================================================================
--- repos/community-any/PKGBUILD (rev 0)
+++ repos/community-any/PKGBUILD 2013-09-27 08:30:34 UTC (rev 97684)
@@ -0,0 +1,49 @@
+# $Id$
+# Maintainer: Maxime Gauduin <alucryd at gmail.com>
+# Contributor: Mathieu Clabaut <mathieu.clabaut at gmail.com>
+
+pkgname=taskjuggler3
+pkgver=3.5.0
+pkgrel=4
+pkgdesc="Project Management Software"
+arch=('any')
+url="http://www.taskjuggler.org"
+license=('GPL')
+depends=('ruby-mail' 'ruby-term-ansicolor')
+source=("http://rubygems.org/downloads/${pkgname%3}-${pkgver}.gem"
+ 'tj-system-dirs.patch')
+noextract=("${pkgname%3}-${pkgver}.gem")
+sha256sums=('42f2e81470be9b2486fc074ba6ff04180258f462fed5c46cba871b7518cd0465'
+ '8174f62598b4230df033feb213e5ec25bc6d3105c71455a88514eaff3db0410a')
+
+prepare() {
+ gem install --no-{document,user-install} --ignore-dependencies -i . ${pkgname%3}-${pkgver}.gem
+
+ cd gems/${pkgname%3}-${pkgver}
+ patch -Np1 -i ../../tj-system-dirs.patch
+}
+
+package() {
+ cd gems/${pkgname%3}-${pkgver}
+
+ local _rubyver="$(ruby --version | sed 's/.* \(.*\..*\..*\)p.*/\1/')"
+
+ install -dm 755 "${pkgdir}"/usr/{lib/ruby/{gems/${_rubyver},vendor_ruby},share/{doc,vim/vimfiles/syntax}}
+ mv bin "${pkgdir}"/usr/
+ mv lib "${pkgdir}"/usr/lib/ruby/vendor_ruby/${_rubyver}
+
+# Gem compatibility
+ mv ../../specifications "${pkgdir}"/usr/lib/ruby/gems/${_rubyver}/
+
+# Vim syntax
+ mv data/tjp.vim "${pkgdir}"/usr/share/vim/vimfiles/syntax/
+
+# Data
+ mv data "${pkgdir}"/usr/share/${pkgname%3}
+ mv examples "${pkgdir}"/usr/share/${pkgname%3}/
+
+# Documentation
+ mv manual "${pkgdir}"/usr/share/doc/${pkgname%3}
+}
+
+# vim: ts=2 sw=2 et:
Copied: taskjuggler3/repos/community-any/tj-system-dirs.patch (from rev 97683, taskjuggler3/trunk/tj-system-dirs.patch)
===================================================================
--- repos/community-any/tj-system-dirs.patch (rev 0)
+++ repos/community-any/tj-system-dirs.patch 2013-09-27 08:30:34 UTC (rev 97684)
@@ -0,0 +1,43 @@
+From af46d6b1a731a3e2c3dc7aedcaf8dfe8291a4ab7 Mon Sep 17 00:00:00 2001
+From: Maxime Gauduin <alucryd at gmail.com>
+Date: Wed, 25 Sep 2013 10:42:57 +0200
+Subject: [PATCH] Look for data and manual in system dirs
+
+Signed-off-by: Maxime Gauduin <alucryd at gmail.com>
+---
+ lib/taskjuggler/AppConfig.rb | 2 ++
+ lib/taskjuggler/apps/Tj3Man.rb | 5 ++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/lib/taskjuggler/AppConfig.rb b/lib/taskjuggler/AppConfig.rb
+index 11a214b..2051a17 100644
+--- a/lib/taskjuggler/AppConfig.rb
++++ b/lib/taskjuggler/AppConfig.rb
+@@ -137,6 +137,8 @@ class AppConfig
+ # This one is for Debian based distros
+ dirs << rubyLibDir + '/gems/' \
+ + @@packageName + '-' + @@version + "/#{baseDir}/"
++ # Also look in system share directory
++ dirs << '/usr/share/' + @@packageName
+
+ dirs
+ end
+diff --git a/lib/taskjuggler/apps/Tj3Man.rb b/lib/taskjuggler/apps/Tj3Man.rb
+index 6337dcd..a51f7eb 100644
+--- a/lib/taskjuggler/apps/Tj3Man.rb
++++ b/lib/taskjuggler/apps/Tj3Man.rb
+@@ -105,9 +105,8 @@ EOT
+ # Start the web browser with either the entry page or the page for the
+ # specified keyword.
+ def startBrowser(keyword = nil)
+- # Find the manual relative to this file.
+- manualDir = File.join(File.dirname(__FILE__), '..', '..', '..',
+- 'manual', 'html')
++ # Find the manual in system doc directory.
++ manualDir = '/usr/share/doc/taskjuggler/html'
+ file = "#{manualDir}/#{keyword || 'index'}.html"
+ # Make sure the file exists.
+ unless File.exists?(file)
+--
+1.8.4
+
More information about the arch-commits
mailing list