[engrid] Initial import

Sandro Mani smani at fedoraproject.org
Thu Aug 7 23:03:37 UTC 2014


commit 1825635389d33a69d4e63c801fe483dbf2cead66
Author: Sandro Mani <manisandro at gmail.com>
Date:   Fri Aug 8 01:02:36 2014 +0200

    Initial import

 .gitignore         |    1 +
 engrid.png         |  Bin 0 -> 1138 bytes
 engrid.spec        |  190 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 engrid_build.patch |  111 ++++++++++++++++++++++++++++++
 sources            |    1 +
 5 files changed, 303 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f28eef1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/enGits-engrid-1.4.0-264-ge6d55f5.tar.gz
diff --git a/engrid.png b/engrid.png
new file mode 100644
index 0000000..9ea123d
Binary files /dev/null and b/engrid.png differ
diff --git a/engrid.spec b/engrid.spec
new file mode 100644
index 0000000..87b69bd
--- /dev/null
+++ b/engrid.spec
@@ -0,0 +1,190 @@
+# Refer to the comment for Source0 below on how to obtain the source tarball
+# The saved file has format enGits-engrid-$version-$ahead-g$shortcommit.tar.gz
+%global commit e6d55f564c20a8d13bee6bba6280a32320f1bde2
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global ahead 264
+
+# If ahead is 0, the tarball corresponds to a release version, otherwise to a git snapshot
+%if %{ahead} > 0
+%global snap .git%{shortcommit}
+%endif
+
+Name:           engrid
+Version:        1.4.0
+Release:        3%{?snap}%{?dist}
+Summary:        Mesh generation tool
+
+License:        GPLv3+
+URL:            http://engits.eu/en/engrid
+# wget --content-disposition https://github.com/enGits/engrid/tarball/$commit
+Source0:        https://github.com/enGits/engrid/tarball/%{commit}/enGits-engrid-%{version}-%{ahead}-g%{shortcommit}.tar.gz
+# Taken from src/libengrid/resources/icons/G.png and resized to 64x64
+Source1:        engrid.png
+# - Unbundle netgen
+# - Link against netcdf_cxx
+# - Link against vtk libraries
+# - Don't link against QtNetwork
+Patch0:         engrid_build.patch
+
+BuildRequires:  desktop-file-utils
+BuildRequires:  qt-devel
+BuildRequires:  vtk-devel
+BuildRequires:  netgen-mesher-devel
+BuildRequires:  netcdf-cxx-devel
+BuildRequires:  tex(latex)
+BuildRequires:  texlive-helvetic texlive-ec
+BuildRequires:  tex(amsfonts.sty)
+BuildRequires:  tex(amsmath.sty)
+BuildRequires:  tex(amssymb.sty)
+BuildRequires:  tex(babel.sty)
+BuildRequires:  tex(boxedminipage.sty)
+BuildRequires:  tex(calc.sty)
+BuildRequires:  tex(color.sty)
+BuildRequires:  tex(fancyhdr.sty)
+BuildRequires:  tex(fontenc.sty)
+BuildRequires:  tex(graphicx.sty)
+BuildRequires:  tex(helvet.sty)
+BuildRequires:  tex(ifthen.sty)
+BuildRequires:  tex(inputenc.sty)
+BuildRequires:  tex(lastpage.sty)
+BuildRequires:  tex(layouts.sty)
+BuildRequires:  tex(natbib.sty)
+BuildRequires:  tex(setspace.sty)
+BuildRequires:  tex(titlesec.sty)
+BuildRequires:  tex(ucs.sty)
+BuildRequires:  tex(xspace.sty)
+BuildRequires:  tex(german.ldf)
+# For blender version detection
+BuildRequires:  blender
+
+Requires:       hicolor-icon-theme
+
+%description
+enGrid is an open-source mesh generation software with CFD applications in mind.
+enGrid uses the Netgen library for tetrahedral grid generation and an in-house
+development for prismatic boundary layer grids. Internally, enGrid uses the VTK
+data structures as well as the *.vtu file format.
+
+%package blender
+Summary:        Blender scripts for enGrid
+BuildArch:      noarch
+Requires:       blender
+
+%description blender
+This package contains various Blender scripts for use with enGrid.
+
+
+%package doc
+Summary:        Documentation and Tutorials for enGrid
+BuildArch:      noarch
+
+%description doc
+This package contains the documentation and tutorials for enGrid.
+
+
+%prep
+%autosetup -p1 -n enGits-engrid-%{shortcommit}
+
+# Unbundle netgen
+rm -rf src/ng_svn
+
+# Fix bad permissions
+chmod -x src/libengrid/egvtkinteractorstyle.h
+chmod -x src/libengrid/egvtkinteractorstyle.cpp
+chmod -x src/libengrid/createvolumemesh.cpp
+
+
+%build
+# Build application
+pushd src
+# export CXXFLAGS="$RPM_OPT_FLAGS"
+export VTKINCDIR=%{_includedir}/vtk
+export VTKLIBDIR=%{_libdir}/vtk
+%_qt4_qmake CONFIG+=netcdf
+make %{?_smp_mflags}
+popd
+
+# Build documentation
+pushd manual
+pdflatex main.tex
+mv main.pdf manual.pdf
+popd
+
+
+%install
+# Binary
+install -Dpm 0755 src/engrid %{buildroot}%{_bindir}/engrid
+
+# Shared library
+install -Dpm 755 src/libengrid/libengrid.so.1.0.0 %{buildroot}%{_libdir}/libengrid.so.1.0.0
+ln -s %{_libdir}/libengrid.so.1.0.0 %{buildroot}%{_libdir}/libengrid.so.1.0
+ln -s %{_libdir}/libengrid.so.1.0.0 %{buildroot}%{_libdir}/libengrid.so.1
+
+# Desktop file, icon
+desktop-file-install \
+  --dir=%{buildroot}%{_datadir}/applications \
+  --set-icon=engrid \
+  --add-category=Science \
+  --remove-category=Education \
+  engrid.desktop
+install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/engrid.png
+
+# Blender scripts
+# Determine blender version
+ver=`blender -v | grep -Eo '[0-9]\.[0-9]+'`
+# Copy most recent version only
+newest=`ls -1 src/blender_scripts/ | sort -n | tail -1`
+install -dm 0755 %{buildroot}%{_datadir}/blender/$ver/scripts/addons
+cp -a src/blender_scripts/$newest %{buildroot}%{_datadir}/blender/$ver/scripts/addons/engrid
+
+# Manpage
+install -Dpm 0644 debian/engrid.1 %{buildroot}%{_mandir}/man1/engrid.1
+
+
+%post
+/sbin/ldconfig
+update-desktop-database &> /dev/null || :
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+/sbin/ldconfig
+update-desktop-database &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files
+%doc licence.txt
+%{_bindir}/engrid
+%{_datadir}/applications/engrid.desktop
+%{_datadir}/icons/hicolor/64x64/apps/engrid.png
+%{_libdir}/libengrid.so.*
+%{_mandir}/man1/engrid.1*
+
+%files blender
+%doc licence.txt
+%{_datadir}/blender/*/scripts/addons/engrid/
+
+%files doc
+%doc licence.txt tutorials manual/manual.pdf
+
+
+%changelog
+* Wed Aug 06 2014 Sandro Mani <manisandro at gmail.com> - 1.4.0-3.gite6d55f5
+- Install manpage
+- Fix spurious executable permissions
+
+* Wed Jul 30 2014 Sandro Mani <manisandro at gmail.com> - 1.4.0-2.gite6d55f5
+- Don't rename license file
+- Use desktop-file-install to set icon and fix category
+- Add doc subpackage
+- Add blender subpackage
+- Update build patch to also link against vtk libraries, and not QtNetwork
+
+* Thu Jun 19 2014 Sandro Mani <manisandro at gmail.com> - 1.4.0-1.gite6d55f5
+- Initial package
diff --git a/engrid_build.patch b/engrid_build.patch
new file mode 100644
index 0000000..386e7ad
--- /dev/null
+++ b/engrid_build.patch
@@ -0,0 +1,111 @@
+diff -rupN enGits-engrid-e6d55f5/src/engrid.pro enGits-engrid-e6d55f5-new/src/engrid.pro
+--- enGits-engrid-e6d55f5/src/engrid.pro	2014-03-10 09:48:24.000000000 +0100
++++ enGits-engrid-e6d55f5-new/src/engrid.pro	2014-07-30 19:09:04.584948072 +0200
+@@ -6,19 +6,10 @@ CONFIG   += ordered recursive
+ 
+ CONFIG += debug_and_release
+ 
+-debian {
+-  SUBDIRS   =
+-}
+-else {
+-  SUBDIRS   = netgen
+-}
+-
+ SUBDIRS  += libengrid
+ SUBDIRS  += engrid
+ 
+-netgen.file = netgen_svn/ng.pro
+ libengrid.file    = libengrid/libengrid.pro
+-libengrid.depends = netgen
+ 
+ engrid.file    = engrid.pro.app
+ engrid.depends = libengrid 
+diff -rupN enGits-engrid-e6d55f5/src/engrid.pro.app enGits-engrid-e6d55f5-new/src/engrid.pro.app
+--- enGits-engrid-e6d55f5/src/engrid.pro.app	2014-03-10 09:48:24.000000000 +0100
++++ enGits-engrid-e6d55f5-new/src/engrid.pro.app	2014-07-30 19:10:16.358944883 +0200
+@@ -46,11 +46,12 @@ win32-msvc* {
+     LIBS        += ../../netCDF/lib/netcdfcxx.lib
+   }
+ } else {
++  CONFIG          += link_pkgconfig
+   QMAKE_CXXFLAGS += -Wno-deprecated -g
+   INCLUDEPATH     += $(VTKINCDIR)
+   LIBS            += -L$(VTKLIBDIR)
+-  LIBS            += -L./netgen_svn -lng
+   LIBS            += -L./libengrid -lengrid
++  PKGCONFIG       += netgen-mesher
+   brlcad {
+     INCLUDEPATH += $(BRLCADINCDIR)
+     INCLUDEPATH += $(BRLCADINCDIR)/openNURBS
+@@ -98,8 +99,6 @@ greaterThan(VTK_MAJOR_VERSION, 5) {
+ INCLUDEPATH += ./libengrid
+ INCLUDEPATH += ./libengrid-build
+ INCLUDEPATH += ../engrid-build
+-INCLUDEPATH += ./netgen_svn/netgen-mesher/netgen/nglib
+-INCLUDEPATH += ./netgen_svn/netgen-mesher/netgen/libsrc/general
+ 
+ OTHER_FILES += checkcomments.py todo.txt
+ RESOURCES   += libengrid/engrid.qrc
+diff -rupN enGits-engrid-e6d55f5/src/libengrid/libengrid.pro enGits-engrid-e6d55f5-new/src/libengrid/libengrid.pro
+--- enGits-engrid-e6d55f5/src/libengrid/libengrid.pro	2014-03-10 09:48:24.000000000 +0100
++++ enGits-engrid-e6d55f5-new/src/libengrid/libengrid.pro	2014-07-31 00:45:36.508574454 +0200
+@@ -5,7 +5,7 @@ LANGUAGE = C++
+ TARGET   = engrid
+ 
+ CONFIG += qt debug_and_release thread
+-QT     += xml network opengl`
++QT     += xml opengl`
+ 
+ win32-msvc* {
+   CONFIG += staticlib
+@@ -46,8 +46,21 @@ win32-msvc* {
+     LIBS        += ../../../netCDF/lib/netcdfcxx.lib
+   }
+ } else {
++  CONFIG          += link_pkgconfig
+   QMAKE_CXXFLAGS  += -Wno-deprecated -g
+   INCLUDEPATH     += $(VTKINCDIR)
++  LIBS            += -L$(VTKLIBDIR)
++  LIBS            += -lvtkCommonCore
++  LIBS            += -lvtkCommonExecutionModel
++  LIBS            += -lvtkGUISupportQt
++  LIBS            += -lvtkInteractionStyle
++  LIBS            += -lvtkIOLegacy
++  LIBS            += -lvtkIOPLY
++  LIBS            += -lvtkIOXML
++  LIBS            += -lvtkRenderingAnnotation
++  LIBS            += -lvtkRenderingCore
++  LIBS            += -lvtkRenderingFreeTypeOpenGL
++  PKGCONFIG       += netgen-mesher
+   brlcad {
+     INCLUDEPATH += $(BRLCADINCDIR)
+     INCLUDEPATH += $(BRLCADINCDIR)/openNURBS
+@@ -55,14 +68,13 @@ win32-msvc* {
+   }
+   netcdf {
+     DEFINES     += TAU_SUPPORT
++    LIBS        += -lnetcdf_c++
+   }
+ }
+ 
+ 
+ INCLUDEPATH += ..
+ INCLUDEPATH += ./libengrid
+-INCLUDEPATH += ../netgen_svn/netgen-mesher/netgen/nglib
+-INCLUDEPATH += ../netgen_svn/netgen-mesher/netgen/libsrc/general
+ 
+ # VTK
+ 
+diff -rupN enGits-engrid-e6d55f5/src/misc/engrid-standard.pri enGits-engrid-e6d55f5-new/src/misc/engrid-standard.pri
+--- enGits-engrid-e6d55f5/src/misc/engrid-standard.pri	2014-03-10 09:48:24.000000000 +0100
++++ enGits-engrid-e6d55f5-new/src/misc/engrid-standard.pri	2014-07-31 00:19:33.365643915 +0200
+@@ -5,7 +5,7 @@ TARGET = engrid
+ CONFIG         += qt debug_and_release thread
+ 
+ QMAKE_CXXFLAGS += -Wall
+-QT             += xml network opengl
++QT             += xml opengl
+ QMAKE_CXXFLAGS += -Wno-deprecated
+ 
+ LIBS += -lm
diff --git a/sources b/sources
index e69de29..5664b1f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+35bf9d6cf751c98f7e143c29c766423f  enGits-engrid-1.4.0-264-ge6d55f5.tar.gz


More information about the scm-commits mailing list