Skip to content
Snippets Groups Projects
Commit d43e6d34 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

dawn and dawncut to use geant4.kek.jp url (dawncut rewrite)

parent 6e1b59bd
No related branches found
No related tags found
1 merge request!290Resolve "Use new eic-n0 docker runner"
......@@ -32,8 +32,7 @@ class Dawn(MakefilePackage):
# Note: Dawn homepage not available anymore...
homepage = "https://geant4.kek.jp/~tanaka"
#url = "http://geant4.kek.jp/~tanaka/src/dawn_3_91a.tgz"
url = "http://10.10.241.24/software/dawn_3_91a.tgz"
url = "http://geant4.kek.jp/~tanaka/src/dawn_3_91a.tgz"
maintainers = ['sly2j']
......
......@@ -15,17 +15,36 @@ class Dawncut(MakefilePackage):
# dawn webpage not available anymore
homepage = "https://geant4.kek.jp/~tanaka"
url = "http://10.10.241.24/software/dawncut_1_54a.tar.gz"
url = "http://geant4.kek.jp/~tanaka/src/dawncut_1_54a.taz"
maintainers = ['sly2j']
version('1_54a',
sha256='17d7ccd2ff863e2f3700cc3e751cfca37a1425abfa0edc3b8f6497d8746ddcf4')
url='http://geant4.kek.jp/~tanaka/src/dawncut_1_54a.taz',
sha256='531e1f0e2ed35de3e2b1803108c0efb732d83a0c676f14083bd41a71346b4fa9',
expand=False)
# FIXME: Add dependencies if required.
# depends_on('foo')
phases = ['unpack', 'repatch', 'edit', 'build', 'install']
## Patch to add install directive to Makefile
patch('install.patch')
def unpack(self, spec, prefix):
# Untar inner tar files
def members(tf, tld):
l = len(tld)
for member in tf.getmembers():
if member.path.startswith(tld):
member.path = member.path[l:]
yield member
with working_dir(self.stage.source_path):
import tarfile
install_tar = tarfile.open('dawncut_1_54a.taz')
install_tar.extractall(members=members(install_tar, 'dawncut_1_54a/'))
def repatch(self, spec, prefix):
# Patch to add install directive to Makefile
src = self.stage.source_path
patches = self.package_dir
which('patch')('-N', '-l', '-p1',
'-i', join_path(patches, 'install.patch'))
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment