added files to generate rpms or debs

These files are tested at OpenSUSE Build Service
pull/1/head
Sebastian Held 2012-03-02 20:00:54 +01:00
parent 980ef182c2
commit 07890c4da8
9 changed files with 268 additions and 0 deletions

15
linux/README.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/README b/README
index 1962055..ae6df82 100644
--- a/README
+++ b/README
@@ -10,8 +10,8 @@ Forum: http://openems.de/forum/
Tutorials: http://openems.de/index.php/Tutorials
-To use openEMS from Matlab or Octave, you need to include the <openEMS-install-folder>/matlab folder in the respective environment:
-> addpath( '<openEMS-install-folder>/matlab' );
+To use openEMS from Matlab or Octave, you need to include the /usr/share/openEMS/matlab folder in the respective environment:
+> addpath( '/usr/share/openEMS/matlab' );
To verify the correct installation follow the instructions at:
http://openems.de/index.php/Tutorial:_First_Steps

21
linux/debian.changelog Normal file
View File

@ -0,0 +1,21 @@
openems (0.0.27-1) stable; urgency=low
* New upstream release
-- Sebastian Held <sebastian.held@gmx.de> Thu, 1 Mar 2012 22:37:38 +0100
openems (0.0.26-1) stable; urgency=low
* New upstream release
-- Sebastian Held <sebastian.held@gmx.de> Sat, 21 Jan 2012 12:32:38 +0100
openems (0.0.25-5) stable; urgency=low
* added README
-- Sebastian Held <sebastian.held@gmx.de> Thu, 29 Dec 2011 20:35:38 +0100
openems (0.0.25-4) stable; urgency=low
* Upstream fixes
-- Sebastian Held <sebastian.held@gmx.de> Sun, 25 Dec 2011 21:23:38 +0100
openems (0.0.25-3) stable; urgency=low
* Changed dependancy on boost to enable build on oneiric
-- Sebastian Held <sebastian.held@gmx.de> Sun, 18 Dec 2011 21:39:38 +0100
openems (0.0.25-2) stable; urgency=low
* New upstream release
-- Sebastian Held <sebastian.held@gmx.de> Sun, 4 Dec 2011 17:19:38 +0100
openems (0.0.24-1) stable; urgency=low
* Initial Release
-- Sebastian Held <sebastian.held@gmx.de> Thu, 8 Oct 2011 8:30:38 +0200

12
linux/debian.control Normal file
View File

@ -0,0 +1,12 @@
Source: openems
Section: contrib/science
Priority: optional
Maintainer: Sebastian Held <sebastian.held@gmx.de>
Build-Depends: debhelper (>=7.0.50~), qt4-qmake, libfparser4, libhdf5-serial-dev, libtinyxml-dev, csxcad-dev (>= 0.2.4), libopenmpi-dev, libvtk5-qt4-dev, libboost-all-dev
Package: openems
Architecture: any
Depends: ${shlibs:Depends}
Recommends: octave3.2, paraview
Description: Free and Open Electromagnetic Field Solver
OpenEMS is a free and open-source electromagnetic field solver using the (EC-)FDTD method.

2
linux/debian.docs Normal file
View File

@ -0,0 +1,2 @@
COPYING
README

93
linux/debian.rules Normal file
View File

@ -0,0 +1,93 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=4
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
qmake-qt4 QMAKE_CFLAGS="$$CFLAGS" QMAKE_CXXFLAGS="$$CFLAGS" openEMS.pro
make
cd nf2ff
qmake-qt4 QMAKE_CFLAGS="$$CFLAGS" QMAKE_CXXFLAGS="$$CFLAGS" nf2ff.pro
make
cd ..
# --- end custom part for compiling
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
make clean || true
# --- end custom part for cleaning up
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package
# The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/<nameOfPackage>
make install INSTALL_ROOT=/usr/src/packages/BUILD/debian/openems
cd nf2ff
make install INSTALL_ROOT=/usr/src/packages/BUILD/debian/openems
cd ..
# --- end custom part for installing
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installcron
dh_installman
dh_installinfo
# dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

2
linux/debian.series Normal file
View File

@ -0,0 +1,2 @@
invoke_openEMS.m.patch -p1
README.patch -p1

View File

@ -0,0 +1,13 @@
diff --git a/matlab/invoke_openEMS.m b/matlab/invoke_openEMS.m
index 4de39e4..31ecb75 100644
--- a/matlab/invoke_openEMS.m
+++ b/matlab/invoke_openEMS.m
@@ -32,6 +32,8 @@ end
filename = mfilename('fullpath');
dir = fileparts( filename );
openEMS_Path = [dir filesep '..' filesep];
+
+openEMS_Path = ''; % this is a packaged openEMS installation; openEMS.sh is found in $PATH
if isunix
openEMS_Path = [openEMS_Path 'openEMS.sh'];

9
linux/openEMS.dsc Normal file
View File

@ -0,0 +1,9 @@
Format: 1.0
Source: openems
Version: 0.0.27-1
Binary: openems
Maintainer: Thorsten Liebig <thorsten.liebig@uni-due.de>, Sebastian Held <sebastian.held@gmx.de>
Homepage: http://www.openems.de
Architecture: any
Build-Depends: debhelper (>= 5.0.0), qt4-qmake, libfparser4, libhdf5-serial-dev, libtinyxml-dev, csxcad-dev (>= 0.2.4), libopenmpi-dev, libvtk5-qt4-dev, libboost-all-dev
DEBTRANSFORM-TAR: openEMS-0.0.27.tar.bz2

101
linux/openEMS.spec Normal file
View File

@ -0,0 +1,101 @@
#
# spec file for package [spectemplate]
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: openEMS
Version: 0.0.27
Release: 1
Summary: Free and Open Electromagnetic Field Solver
Group: Productivity/Scientific/Physics
License: GPLv3
URL: http://www.openems.de
Source0: %{name}-%{version}.tar.bz2
Patch0: invoke_openEMS.m.patch
Patch1: README.patch
BuildRoot: %_tmppath/%name-%version-build
# libqt4-devel is needed only to provide qmake (the Qt-libraries are not used)
# libfparser4-devel contains a static library => no runtime requirement
BuildRequires: libqt4-devel gcc-c++ libfparser4-devel hdf5-devel tinyxml-devel CSXCAD-devel openmpi-devel vtk-devel boost-devel
Requires: CSXCAD
# determine qt4 qmake executable
%if 0%{?fedora}
%global qmake qmake-qt4
%else
%global qmake qmake
%endif
%description
OpenEMS is a free and open-source electromagnetic field solver using the (EC-)FDTD method.
%prep
%setup -q
%patch0 -p1
#%if 0%{?fedora}
#%patch1 -p1
#%endif
%patch1 -p1
%build
ADDFLAGS="-msse" # enable at least the SSE command set (no SSE makes no sense -- way too slow)
%qmake QMAKE_CFLAGS="%optflags $ADDFLAGS" QMAKE_CXXFLAGS="%optflags $ADDFLAGS" LIB_SUFFIX="$(echo %_lib | cut -b4-)" openEMS.pro
make %{?_smp_mflags}
cd nf2ff
%qmake QMAKE_CFLAGS="%optflags $ADDFLAGS" QMAKE_CXXFLAGS="%optflags $ADDFLAGS" LIB_SUFFIX="$(echo %_lib | cut -b4-)" nf2ff.pro
make %{?_smp_mflags}
cd ..
%install
make INSTALL_ROOT=%{buildroot} install
cd nf2ff
make INSTALL_ROOT=%{buildroot} install
cd ..
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README COPYING TODO known_bugs known_problems
/usr/share/%{name}
/usr/bin/openEMS*
/usr/bin/nf2ff
%changelog
* Thu Mar 1 2012 Sebastian Held <sebastian.held@gmx.de> - 0.0.27-1
- new upstream version
* Sat Jan 21 2012 Sebastian Held <sebastian.held@gmx.de> - 0.0.26-1
- new upstream version
* Mon Jan 9 2012 Sebastian Held <sebastian.held@gmx.de> - 0.0.25-4
- added runtime dep on CSXCAD
* Thu Dec 29 2011 Sebastian Held <sebastian.held@gmx.de> - 0.0.25-3
- added README
* Sun Dec 25 2011 Sebastian Held <sebastian.held@gmx.de> - 0.0.25-2
- Fedora 16 build fix and upstream fixes
* Sun Dec 4 2011 Sebastian Held <sebastian.held@gmx.de> - 0.0.25-1
- new upstream version
* Mon Oct 3 2011 Sebastian Held <sebastian.held@gmx.de> - 0.0.24-1
- initial version