spack/var/spack/repos/builtin/packages/bib2xhtml/package.py
Todd Gamblin 89d5127900 New, cleaner package repository structure.
Package repositories now look like this:

    top-level-dir/
        repo.yaml
        packages/
            libelf/
                package.py
            mpich/
                package.py
            ...

This leaves room at the top level for additional metadata, source,
per-repo configs, indexes, etc., and it makes it easy to see that
something is a spack repo (just look for repo.yaml and packages).
2015-11-26 14:19:27 -08:00

28 lines
1.1 KiB
Python

from spack import *
from glob import glob
class Bib2xhtml(Package):
"""bib2xhtml is a program that converts BibTeX files into HTML."""
homepage = "http://www.spinellis.gr/sw/textproc/bib2xhtml/"
url='http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v3.0-15-gf506.tar.gz'
version('3.0-15-gf506', 'a26ba02fe0053bbbf2277bdf0acf8645')
def url_for_version(self, v):
return ('http://www.spinellis.gr/sw/textproc/bib2xhtml/bib2xhtml-v%s.tar.gz' % v)
def install(self, spec, prefix):
# Add the bst include files to the install directory
bst_include = join_path(prefix.share, 'bib2xhtml')
mkdirp(bst_include)
for bstfile in glob('html-*bst'):
install(bstfile, bst_include)
# Install the script and point it at the user's favorite perl
# and the bst include directory.
mkdirp(prefix.bin)
install('bib2xhtml', prefix.bin)
filter_file(r'#!/usr/bin/perl',
'#!/usr/bin/env BSTINPUTS=%s perl' % bst_include,
join_path(prefix.bin, 'bib2xhtml'))