# Maintainer: Max Meyer pkgname=local_pac pkgver=0.1.8 pkgrel=1 pkgdesc="local pacfile serving server" arch=(i686 x86_64) url="https://github.com/dg-vrnetze/${pkgname}" license=('MIT') depends=(ruby) install=${pkgname}.install makedepends=(rubygems filegen) source=(http://gems.rubyforge.org/gems/$pkgname-$pkgver.gem) noextract=($pkgname-$pkgver.gem) sha256sums=('76d773623232c4f87823d318252f1ceff9887f56136a4d54e9bc9b1d5c54e7b8') package() { cd "$srcdir" _library_dir=/usr/lib/${pkgname} _share_dir="${_library_dir}/gems/${pkgname}-${pkgver}/share" _systemd_dir=/usr/lib/systemd/system _bin_dir=/usr/bin _data_dir=/var/${pkgname}/data _log_dir=/var/log/${pkgname} _config_dir=/etc/${pkgname} _examples_dir=/usr/share/${pkgname}/examples install -d ${pkgdir}$_library_dir install -d ${pkgdir}$_bin_dir install -d ${pkgdir}$_systemd_dir install -d ${pkgdir}$_data_dir install -d ${pkgdir}$_log_dir install -d ${pkgdir}$_config_dir GEM_HOME="${pkgdir}${_library_dir}" GEM_ROOT="${pkgdir}${_library_dir}" GEM_PATH="${pkgdir}${_library_dir}" /usr/bin/gem install --env-shebang --wrappers --no-ri --no-rdoc --install-dir ${pkgdir}${_library_dir} $pkgname --verbose install -D -m 644 ${pkgdir}${_share_dir}/archlinux/config.yaml ${pkgdir}${_examples_dir}/config.yaml.example SOFTWARE_BINARY=$_library_dir/gems/${pkgname}-${pkgver}/bin/${pkgname} SOFTWARE_LIB=/usr/lib/local_pac filegen ${pkgdir}${_share_dir}/archlinux/startup.erb > ${pkgdir}${_bin_dir}/${pkgname} chmod a+x ${pkgdir}/${_bin_dir}/${pkgname} rm -rf ${pkgdir}/${_library_dir}/cache rm -rf ${pkgdir}/${_library_dir}/{build_info,doc} install -D -m644 ${pkgdir}/$_share_dir/systemd/${pkgname}.service ${pkgdir}/$_systemd_dir/${pkgname}.service install -D -m644 ${pkgdir}/$_share_dir/systemd/${pkgname}@.service ${pkgdir}/$_systemd_dir/${pkgname}@.service #install -D -m644 ${pkgdir}/$_share_dir/systemd/${pkgname}.socket ${pkgdir}/$_systemd_dir install -D -m644 ${pkgdir}${_share_dir}/../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } # vim:set ts=2 sw=2 et: