diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-11-26 14:19:27 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-11-26 14:19:27 -0800 |
commit | 89d5127900dda96b2a583c4c1a9bdac8e51c1c15 (patch) | |
tree | fe491c5c4046702cc9ddb84d63375e28a610f1b1 /var/spack/repos/builtin/packages/bzip2 | |
parent | 04f032d6e397ce219a673c93277683060def52fd (diff) | |
download | spack-89d5127900dda96b2a583c4c1a9bdac8e51c1c15.tar.gz spack-89d5127900dda96b2a583c4c1a9bdac8e51c1c15.tar.bz2 spack-89d5127900dda96b2a583c4c1a9bdac8e51c1c15.tar.xz spack-89d5127900dda96b2a583c4c1a9bdac8e51c1c15.zip |
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).
Diffstat (limited to 'var/spack/repos/builtin/packages/bzip2')
-rw-r--r-- | var/spack/repos/builtin/packages/bzip2/package.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py new file mode 100644 index 0000000000..d88336664d --- /dev/null +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -0,0 +1,36 @@ +from spack import * +from glob import glob + +class Bzip2(Package): + """bzip2 is a freely available, patent free high-quality data + compressor. It typically compresses files to within 10% to 15% + of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression + and six times faster at decompression.""" + homepage = "http://www.bzip.org" + url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" + + version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b') + + def install(self, spec, prefix): + # No configure system -- have to filter the makefile for this package. + filter_file(r'CC=gcc', 'CC=cc', 'Makefile', string=True) + + make('-f', 'Makefile-libbz2_so') + make('clean') + make("install", "PREFIX=%s" % prefix) + + bzip2_exe = join_path(prefix.bin, 'bzip2') + install('bzip2-shared', bzip2_exe) + for i, libfile in enumerate(glob('libbz2.so*')): + install(libfile, prefix.lib) + if i == 0: + symlink(join_path(prefix.lib, libfile), join_path(prefix.lib, 'libbz2.so')) + + bunzip2 = join_path(prefix.bin, 'bunzip2') + remove(bunzip2) + symlink(bzip2_exe, bunzip2) + + bzcat = join_path(prefix.bin, 'bzcat') + remove(bzcat) + symlink(bzip2_exe, bzcat) |