# Contributor: AndrĂ¡s Wacha # Maintainer: Erich Eckner pkgname=demeter pkgver=0.9.26 pkgrel='2' pkgdesc="Data Analysis Tools for X-ray Spectroscopy" arch=('x86_64' 'i686') url="https://bruceravel.github.io/demeter" license=('BSD') groups=() depends=( 'ifeffit' 'perl-archive-zip' 'perl-capture-tiny' 'perl-chemistry-elements' 'perl-config-ini' 'perl-const-fast' 'perl-datetime' 'perl-encoding-fixlatin' 'perl-file-countlines' 'perl-file-monitor-lite' 'perl-file-slurper' 'perl-file-touch' 'perl-graph' 'perl-graphics-gnuplotif' 'perl-heap' 'perl-list-moreutils' 'perl-math-combinatorics' 'perl-math-derivative' 'perl-math-random' 'perl-math-round' 'perl-math-spline' 'perl-moose' 'perl-moosex-aliases' 'perl-moosex-types' 'perl-moosex-types-laxnum' 'perl-pdl' 'perl-pdl-stats' 'perl-pod-pom' 'perl-pod-projectdocs' 'perl-regexp-assemble' 'perl-regexp-common' 'perl-spreadsheet-writeexcel' 'perl-statistics-descriptive' 'perl-term-sk' 'perl-term-twiddle' 'perl-text-template' 'perl-text-unidecode' 'perl-tree-simple' 'perl-want' 'perl-wx' 'perl-xmlrpc-lite' 'pgplot' ) makedepends=( 'imagemagick' 'perl-capture-tiny' 'perl-file-copy-recursive' 'perl-file-which' 'perl-file-slurper' 'perl-image-size' 'perl-ppi' 'perl-ppi-html' 'perl-pod-projectdocs' 'perl-syntax-highlight-perl' 'perl-template-toolkit' ) checkdepends=( 'perl-yaml-tiny' ) [ -z "$DISPLAY" ] && checkdepends+=('xorg-server-xvfb') optdepends=( 'perl-encoding-fixlatin-xs' 'perl-file-monitor-lite' 'perl-graphics-gnuplotif' 'perl-term-sk' 'perl-term-twiddle' 'perl-wx' ) provides=() conflicts=() replaces=() backup=() options=() source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/bruceravel/${pkgname}/archive/${pkgver}.tar.gz" 'dartemis.desktop' 'dathena.desktop' 'dhephaestus.desktop' ) sha512sums=('1e79fba4a5a6da35e6d3b353455d7c17b3af5455ee43288d644524ebdb15cba483ebd57d6cf216b71f3983b29dddd3762248758f5565ee770d6f695538b6f112' '43457010f1d7251c606380c0a4ca9faa601be627d37476c4a23dd1d4715c1793bfbdfb45dd8925c2fe8b92b9d1f4798f05b22a4898633a2b6e9b702cafe767a7' '78cd3f5cef6e990f386c6161e214b6e4986e2cccf3019b1766f3ce97cb81b40804092d85a7f532e76fd0e5185940ea0a3b9dd01315ffc177fcca75164b1940f5' '4f7b47ed4b09226fe494b52ca9f51d0ac2a12e816507bd279c6cfde14c356f5843740c0d2c01781eaf0c0b8ad3a0d49a617d1a5ccc1af67d67bae26498adc1d3') prepare() { cd ${pkgname}-${pkgver} export PGPLOT_DIR='/usr/lib' } build() { ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \ PERL_AUTOINSTALL=--skipdeps \ PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \ PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \ MODULEBUILDRC=/dev/null \ PERL_USE_UNSAFE_INC=1 cd ${pkgname}-${pkgver} if [ -z "$DISPLAY" ]; then warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)" xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" perl ./Build.PL xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build else perl ./Build.PL ./Build fi ) } check() { cd ${pkgname}-${pkgver} if [ -z "$DISPLAY" ]; then warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)" xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build test else ./Build test fi } package() { cd ${pkgname}-${pkgver} ./Build install mkdir -p ${pkgdir}/usr/share/icons/hicolor/48x48/apps cp "blib/lib/Demeter/UI/Artemis/share/artemis_icon.png" ${pkgdir}/usr/share/icons/hicolor/48x48/apps/artemis.png cp "blib/lib/Demeter/UI/Athena/share/athena_icon.png" ${pkgdir}/usr/share/icons/hicolor/48x48/apps/athena.png convert "blib/lib/Demeter/UI/Atoms/icons/atoms.ico" ${pkgdir}/usr/share/icons/hicolor/48x48/apps/atoms.png cp "blib/lib/Demeter/UI/Hephaestus/icons/vulcan.png" ${pkgdir}/usr/share/icons/hicolor/48x48/apps/vulcan.png mkdir -p ${pkgdir}/usr/share/applications cp "${srcdir}/dhephaestus.desktop" ${pkgdir}/usr/share/applications cp "${srcdir}/dartemis.desktop" ${pkgdir}/usr/share/applications cp "${srcdir}/dathena.desktop" ${pkgdir}/usr/share/applications }