# $Id$ # Maintainer: Maxime Gauduin # Contributor: Mathieu Clabaut pkgname=taskjuggler3 pkgver=3.5.0 pkgrel=7 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-ruby2.1.patch' 'tj-system-dirs.patch') noextract=("${pkgname%3}-${pkgver}.gem") sha256sums=('42f2e81470be9b2486fc074ba6ff04180258f462fed5c46cba871b7518cd0465' 'e59b510acd1d176ef384101b7eba541713775c8da06c503b48020e8726f8629c' '973f9b2d538e5caf7f05bccfe8c16cafba2222703315ab7ee7569738063eea6c') prepare() { gem install --no-{document,user-install} --ignore-dependencies -i . ${pkgname%3}-${pkgver}.gem cd gems/${pkgname%3}-${pkgver} patch -Np1 -i ../../tj-ruby2.1.patch patch -Np1 -i ../../tj-system-dirs.patch } package() { cd gems/${pkgname%3}-${pkgver} ### this was causing issues between locally built and other ### ruby related packages installed from the repos. ### local _rubyver="$(ruby --version | sed 's/.* \(.*\..*\..*\)p.*/\1/')" local _rubyver="2.1.0" ### added the taskjuggler directory to the install line, though I'm not sure that's correct ### without it, the data dir below was only having contents copied, not the dir as-is ### in other words, the resulting structure was ### /usr/share/taskjuggler/{css,icons,scripts} ### /usr/share/taskjuggler/examples ### ### I don't understand why the first instance of mv only copies contents ### but the subsequent one copied the dir? install -dm 755 "${pkgdir}"/usr/{lib/ruby/{gems/${_rubyver},vendor_ruby},share/{taskjuggler,doc,vim/vimfiles/{ftdetect,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/ echo 'au! BufNewFile,BufRead *.tjp,*.tji set ft=tjp' > "${pkgdir}"/usr/share/vim/vimfiles/ftdetect/tjp.vim ### for the modified tj-system-dirs.patch to work, I believe we need to maintain tj's ### dir structure, which features ./pkgname/{data,examples}, whereas the as-is pkg was yielding ### ./pkname/{css,icons,scripts,examples} vs. ./pkgname/{data,examples} # 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: