Skip to content
Snippets Groups Projects
Commit ea368460 authored by Freddie Akeroyd's avatar Freddie Akeroyd
Browse files

Add hooks for building a native rpm on ubuntu - we will then use

the "alien" program to convert this into a .deb package
refs #1253
parent e487960c
No related branches found
No related tags found
No related merge requests found
...@@ -108,23 +108,15 @@ if os.name == 'nt': ...@@ -108,23 +108,15 @@ if os.name == 'nt':
else: else:
if not rpmBuild: print "* COMMENCING LINUX BUILD *"
print "* COMMENCING LINUX BUILD *" f=open('Build/Scons_Linux.conf', 'r')
f=open('Build/Scons_Linux.conf', 'r') for ln in f:
for ln in f: boost_path=MantidBuild.procHeaderPath(ln,'BOOST_ROOT',boost_path)
boost_path=MantidBuild.procHeaderPath(ln,'BOOST_ROOT',boost_path) poco_path=MantidBuild.procHeaderPath(ln,'POCO_ROOT',poco_path)
poco_path=MantidBuild.procHeaderPath(ln,'POCO_ROOT',poco_path) python_path=MantidBuild.procHeaderPath(ln,'PYTHON_LIB',python_path)
python_path=MantidBuild.procHeaderPath(ln,'PYTHON_LIB',python_path) boost_append=MantidBuild.procHeader(ln,'BOOST_APPEND',boost_append)
boost_append=MantidBuild.procHeader(ln,'BOOST_APPEND',boost_append) nexus_path=MantidBuild.procHeader(ln,'NEXUS_ROOT',nexus_path)
nexus_path=MantidBuild.procHeader(ln,'NEXUS_ROOT',nexus_path) f.close()
f.close()
else:
boost_path=''
poco_path=''
third_party=''
python_path = ''
boost_append = ''
nexus_path= ''
# Store boost append and nexus path to pass to dependent SConscripts # Store boost append and nexus path to pass to dependent SConscripts
env['BOOST_APPEND'] = boost_append env['BOOST_APPEND'] = boost_append
......
#!/bin/sh #!/bin/sh
# #
# @file make_rpm.sh RPM build script for Mantid # @file make_rpm.sh RPM build script for Mantid
# @author Freddie Akeroyd, STFC ISIS Facility # @author Freddie Akeroyd, STFC ISIS Facility
# @date 30/03/2009 # @date 30/03/2009
# #
function usage { usage() {
cat << EOF cat << EOF
Build an rpm file for Mantid Build an rpm file for Mantid
...@@ -97,5 +96,9 @@ cp -f Mantid.spec $topdir/SPECS ...@@ -97,5 +96,9 @@ cp -f Mantid.spec $topdir/SPECS
rm -f Mantid.spec rm -f Mantid.spec
cd $topdir/SPECS cd $topdir/SPECS
echo "Building RPM file in $topdir/RPMS" echo "Building RPM file in $topdir/RPMS"
rpmbuild -ba Mantid.spec if test -e /etc/debian_version; then
rpmbuild --nodeps -ba Mantid.spec
else
rpmbuild -ba Mantid.spec
fi
echo "Building complete - check $topdir/RPMS" echo "Building complete - check $topdir/RPMS"
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_rhel %(test -e /etc/redhat-release && echo 1 || echo 0) %define is_rhel %(test -e /etc/redhat-release && echo 1 || echo 0)
%define is_debian %(test -e /etc/debian_version && echo 1 || echo 0)
Name: Mantid Name: Mantid
Summary: Data Analysis For ISIS Summary: Data Analysis For ISIS
...@@ -109,11 +110,16 @@ for i in qtiplotrc.py qtiUtil.py mantidplotrc.py mantidplot.py; do ...@@ -109,11 +110,16 @@ for i in qtiplotrc.py qtiUtil.py mantidplotrc.py mantidplot.py; do
done done
install -m755 Code/Mantid/PythonAPI/MantidFramework.py $RPM_BUILD_ROOT/%{mantidbindir} install -m755 Code/Mantid/PythonAPI/MantidFramework.py $RPM_BUILD_ROOT/%{mantidbindir}
# on ubuntu sip goes into /usr/lib/pyshared etc
# not sure why this is needed
%if %{is_debian}
%else
install -m755 %{pythonsitepackages}/sip.so $RPM_BUILD_ROOT/%{mantidbindir} install -m755 %{pythonsitepackages}/sip.so $RPM_BUILD_ROOT/%{mantidbindir}
for i in %{pythonsitepackages}/PyQt4/*.so; do for i in %{pythonsitepackages}/PyQt4/*.so; do
install -m755 $i $RPM_BUILD_ROOT/%{mantidbindir}/PyQt4/`basename $i` install -m755 $i $RPM_BUILD_ROOT/%{mantidbindir}/PyQt4/`basename $i`
done done
install -m755 %{pythonsitepackages}/PyQt4/__init__.py $RPM_BUILD_ROOT/%{mantidbindir}/PyQt4/__init__.py install -m755 %{pythonsitepackages}/PyQt4/__init__.py $RPM_BUILD_ROOT/%{mantidbindir}/PyQt4/__init__.py
%endif
cp -r instrument/* $RPM_BUILD_ROOT/%{mantidinstrumentdir} cp -r instrument/* $RPM_BUILD_ROOT/%{mantidinstrumentdir}
cp -r Code/Mantid/PythonAPI/scripts/* $RPM_BUILD_ROOT/%{mantidscriptsdir} cp -r Code/Mantid/PythonAPI/scripts/* $RPM_BUILD_ROOT/%{mantidscriptsdir}
...@@ -148,6 +154,8 @@ if test `whoami` = root; then ldconfig; fi ...@@ -148,6 +154,8 @@ if test `whoami` = root; then ldconfig; fi
if test `whoami` = root; then ldconfig; fi if test `whoami` = root; then ldconfig; fi
%changelog %changelog
* Thu May 13 2010 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 1.0.3
- Configure Debian/Ubuntu builds via alien
* Mon Apr 07 2010 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 1.0.2 * Mon Apr 07 2010 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 1.0.2
- Create PythonAlgorithms directory - Create PythonAlgorithms directory
* Mon Mar 30 2009 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 1.0.1 * Mon Mar 30 2009 Freddie Akeroyd <freddie.akeroyd@stfc.ac.uk> - 1.0.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment