-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: b804704
- Loading branch information
Cristina Yenyxe Gonzalez Garcia
committed
Nov 22, 2012
1 parent
002f981
commit 0de252c
Showing
5 changed files
with
129 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import hashlib, os, shutil, sys | ||
|
||
Import('env') # exported by parent SConstruct | ||
|
||
RPMNAME = "hpg-variant" | ||
RPMVERSION = "0.2" | ||
RPMARCH = "x86_64" | ||
RPMBUILDREQUIRES = "gcc,glibc-devel,scons,libconfig-devel,libcurl-devel,gsl-devel,libxml2-devel,zlib-devel".split(", ") | ||
RPMREQUIRES = "libconfig,libcurl,gsl,libxml2,zlib".split(", ") # what are we dependent on? | ||
RPMSUMMARY = "HPG Variant summary" | ||
RPMDESC = "HPG Variant retrieves the effect of genome mutations and allows to conduct analysis" | ||
RPMSECTION = "Application/Engineering" | ||
RPMSOURCE = "hpg-variant-0.2.tar.gz" | ||
RPMURL = "http://bioinfo.cipf.es" | ||
|
||
RPMBUILDIR = 'rpmbuild' | ||
RPMSPECFILE = "%s.spec" % RPMNAME | ||
|
||
|
||
# We want the package to be built when we build 'rpm' | ||
basename_rpmpkg = '%s-%s.fc17.%s.rpm' % (RPMNAME, RPMVERSION, RPMARCH) | ||
root_rpmpkg = "#" + basename_rpmpkg | ||
rpmpkg = os.path.join(RPMBUILDIR, 'RPMS', RPMARCH, basename_rpmpkg) | ||
env.Alias("rpm", rpmpkg) | ||
env.Depends(rpmpkg, RPMSPECFILE) | ||
env.Depends(root_rpmpkg, RPMSPECFILE) | ||
|
||
|
||
# 1) Create folder for building the packages | ||
if os.path.exists(RPMBUILDIR): | ||
shutil.rmtree(RPMBUILDIR) | ||
|
||
SOURCES_DIR = os.path.join(RPMBUILDIR, 'SOURCES') | ||
SPECS_DIR = os.path.join(RPMBUILDIR, 'SPECS') | ||
|
||
os.mkdir(RPMBUILDIR) | ||
os.mkdir(os.path.join(RPMBUILDIR, 'BUILD')) | ||
os.mkdir(os.path.join(RPMBUILDIR, 'RPMS')) | ||
os.mkdir(SOURCES_DIR) | ||
os.mkdir(SPECS_DIR) | ||
os.mkdir(os.path.join(RPMBUILDIR, 'SRPMS')) | ||
|
||
# 2) Copy tarball to RPMBUILDIR/SOURCES subfolder | ||
shutil.copy('../%s' % RPMSOURCE, SOURCES_DIR) | ||
|
||
# 3) Copy .spec file to RPMBUILDIR folder | ||
shutil.copy(RPMSPECFILE, SPECS_DIR) | ||
|
||
# 4) Run rpmbuild with the .spec file as argument and copy to root folder | ||
SOURCETAR = os.path.join(SOURCES_DIR, RPMSOURCE) | ||
cmd = "rpmbuild --define='_topdir %s' -ba $SOURCE" % os.path.abspath(RPMBUILDIR) | ||
|
||
env.Command(rpmpkg, RPMSPECFILE, cmd) | ||
|
||
# 5) Copy to root folder | ||
#print "copy to %s" % root_rpmpkg | ||
#env.Command(root_rpmpkg, rpmpkg, Copy("$TARGET", "$SOURCE")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
%define name hpg-variant | ||
%define version 0.2 | ||
Name: %{name} | ||
Version: %{version} | ||
Release: 1%{?dist} | ||
Summary: HPG Variant | ||
|
||
License: GPLv2 | ||
URL: http://bioinfo.cipf.es | ||
Source0: %{name}-%{version}.tar.gz | ||
|
||
BuildRequires: gcc | ||
BuildRequires: glibc-devel | ||
BuildRequires: scons | ||
BuildRequires: libconfig-devel | ||
BuildRequires: libcurl-devel | ||
BuildRequires: gsl-devel | ||
BuildRequires: libxml2-devel | ||
BuildRequires: zlib-devel | ||
|
||
Requires: libconfig | ||
Requires: libcurl | ||
Requires: gsl | ||
Requires: libxml2 | ||
Requires: zlib | ||
|
||
%description | ||
HPG Variant retrieves the effect of genome mutations and allows to conduct analysis | ||
|
||
%prep | ||
%setup -q | ||
|
||
|
||
%build | ||
scons | ||
|
||
|
||
%install | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
mkdir -p %{buildroot}%{_bindir}/ | ||
cp bin/hpg-var-effect %{buildroot}%{_bindir}/ | ||
cp bin/hpg-var-gwas %{buildroot}%{_bindir}/ | ||
cp bin/hpg-var-vcf %{buildroot}%{_bindir}/ | ||
|
||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ | ||
cp bin/hpg-variant.conf %{buildroot}%{_sysconfdir}/%{name}/ | ||
cp bin/vcf-info-fields.conf %{buildroot}%{_sysconfdir}/%{name}/ | ||
|
||
|
||
%files | ||
%doc | ||
%{_bindir}/* | ||
%{_sysconfdir}/* | ||
|
||
|
||
%changelog | ||
|