diff --git a/linux/README.patch b/linux/README.patch new file mode 100644 index 0000000..e005adb --- /dev/null +++ b/linux/README.patch @@ -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 /matlab folder in the respective environment: +-> addpath( '/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 diff --git a/linux/debian.changelog b/linux/debian.changelog new file mode 100644 index 0000000..2f4bac5 --- /dev/null +++ b/linux/debian.changelog @@ -0,0 +1,21 @@ +openems (0.0.27-1) stable; urgency=low + * New upstream release + -- Sebastian Held Thu, 1 Mar 2012 22:37:38 +0100 +openems (0.0.26-1) stable; urgency=low + * New upstream release + -- Sebastian Held Sat, 21 Jan 2012 12:32:38 +0100 +openems (0.0.25-5) stable; urgency=low + * added README + -- Sebastian Held Thu, 29 Dec 2011 20:35:38 +0100 +openems (0.0.25-4) stable; urgency=low + * Upstream fixes + -- Sebastian Held 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 Sun, 18 Dec 2011 21:39:38 +0100 +openems (0.0.25-2) stable; urgency=low + * New upstream release + -- Sebastian Held Sun, 4 Dec 2011 17:19:38 +0100 +openems (0.0.24-1) stable; urgency=low + * Initial Release + -- Sebastian Held Thu, 8 Oct 2011 8:30:38 +0200 diff --git a/linux/debian.control b/linux/debian.control new file mode 100644 index 0000000..43f9441 --- /dev/null +++ b/linux/debian.control @@ -0,0 +1,12 @@ +Source: openems +Section: contrib/science +Priority: optional +Maintainer: Sebastian Held +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. diff --git a/linux/debian.docs b/linux/debian.docs new file mode 100644 index 0000000..2e3abae --- /dev/null +++ b/linux/debian.docs @@ -0,0 +1,2 @@ +COPYING +README diff --git a/linux/debian.rules b/linux/debian.rules new file mode 100644 index 0000000..2803a64 --- /dev/null +++ b/linux/debian.rules @@ -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/ + 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 diff --git a/linux/debian.series b/linux/debian.series new file mode 100644 index 0000000..fb3707b --- /dev/null +++ b/linux/debian.series @@ -0,0 +1,2 @@ +invoke_openEMS.m.patch -p1 +README.patch -p1 diff --git a/linux/invoke_openEMS.m.patch b/linux/invoke_openEMS.m.patch new file mode 100644 index 0000000..8dba6d5 --- /dev/null +++ b/linux/invoke_openEMS.m.patch @@ -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']; diff --git a/linux/openEMS.dsc b/linux/openEMS.dsc new file mode 100644 index 0000000..8ecfafe --- /dev/null +++ b/linux/openEMS.dsc @@ -0,0 +1,9 @@ +Format: 1.0 +Source: openems +Version: 0.0.27-1 +Binary: openems +Maintainer: Thorsten Liebig , Sebastian Held +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 diff --git a/linux/openEMS.spec b/linux/openEMS.spec new file mode 100644 index 0000000..486b757 --- /dev/null +++ b/linux/openEMS.spec @@ -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 - 0.0.27-1 +- new upstream version +* Sat Jan 21 2012 Sebastian Held - 0.0.26-1 +- new upstream version +* Mon Jan 9 2012 Sebastian Held - 0.0.25-4 +- added runtime dep on CSXCAD +* Thu Dec 29 2011 Sebastian Held - 0.0.25-3 +- added README +* Sun Dec 25 2011 Sebastian Held - 0.0.25-2 +- Fedora 16 build fix and upstream fixes +* Sun Dec 4 2011 Sebastian Held - 0.0.25-1 +- new upstream version +* Mon Oct 3 2011 Sebastian Held - 0.0.24-1 +- initial version