[mathgl] Cmake usage fix, vars and translations

Dmitrij S. Kryzhevich krege at fedoraproject.org
Mon Apr 15 02:26:26 UTC 2013


commit f69c1f8628e51def57f2cc57f90835c8a611d346
Author: Dmitrij S. Kryzhevich <krege at land.ru>
Date:   Mon Apr 15 09:26:20 2013 +0700

    Cmake usage fix, vars and translations

 mathgl.spec |   58 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 43 insertions(+), 15 deletions(-)
---
diff --git a/mathgl.spec b/mathgl.spec
index 76962c4..57de8fd 100644
--- a/mathgl.spec
+++ b/mathgl.spec
@@ -1,6 +1,6 @@
 Name: mathgl
 Version: 2.1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Cross-platform library for making high-quality scientific graphics
 Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
 Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных
@@ -48,6 +48,13 @@ arrays, as well as  window and console modes and for easy embedding
 into other programs. Mathgl integrates into fltk, qt and
 opengl applications
 
+%description -l ru
+Mathgl - это кроссплатформенная библиотека для подготовки высококачественных
+научных иллюстраций. Библиотека обладает возможностью работы с большими
+массивами данных, быстрой отрисовки, при этом работая как в консольном, так и
+оконном режимах, легко интегрируясь в другие приложения. Mathgl может быть
+использована в FLTK, Qt и OpenGL приложениях.
+
 %package devel
 Summary: Libraries and header files for %{name} library
 Group: Development/Libraries
@@ -77,12 +84,16 @@ Summary: UDAV viewer and editor for mathgl graphs
 Group: Applications/Engineering
 Requires: %{name} = %{version}-%{release}
 
-%description udav
+
 UDAV is cross-platform program for interactive data array visualization
 using the MathGL library. UDAV works as a front-end to the mathgl
 scripting engine, allowing for the generation of a wide variety of
 scientific graph styles.
 
+%description udav -l ru
+UDAV - это кроссплатформенное приложение для интерактивной визуализации массивов
+данных с применением библиотеки MathGL. UDAV, как GUI для MathGL может быть
+использован для формирования различного вида научных иллюстраций.
 
 %prep
 %setup -q
@@ -101,28 +112,40 @@ done
 %patch3
 
 %build
-cmake	-DMGL_LIB_INSTALL_DIR=%{_libdir} \
-	-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} \
-	-Denable-all=on -Denable-hdf4=off -Denable-doc=on -Denable-all-swig=on -Denable-all-widgets=on -Denable-mpi=off 
-
-make %{?_smp_mflags} 
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%{cmake} \
+  DMGL_LIB_INSTALL_DIR=%{_libdir} \
+  -Denable-all=on \
+  -Denable-hdf4=off \
+  -Denable-doc=on \
+  -Denable-all-swig=on \
+  -Denable-all-widgets=on \
+  -Denable-mpi=off \
+  ..
+
+make %{?_smp_mflags} -C %{_target_platform}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot} -C %{_target_platform} INSTALL="install -p"
 
 #Remove symlink to .so file in python dir. Let python find libs normally
-unlink $RPM_BUILD_ROOT/%{python_sitelib}/_mathgl.so
+unlink %{buildroot}/%{python_sitelib}/_mathgl.so
 
 #Remove static libraries generated by cmake
-rm ${RPM_BUILD_ROOT}/%{_libdir}/*.a
+rm %{buildroot}/%{_libdir}/*.a
 
 #Remove the binary mgl.cgi. Im not convinced about it (eg mem leak in main), and that its really needed
-rm ${RPM_BUILD_ROOT}/%{_bindir}/mgl.cgi
+rm %{buildroot}/%{_bindir}/mgl.cgi
 
 #Copy info file which is not otherwise installed
-cp texinfo/%{name}_en.info  ${RPM_BUILD_ROOT}/%{_infodir}/%{name}.info
-%post 
+install -p -m 644 texinfo/%{name}_en.info  %{buildroot}/%{_infodir}/%{name}.info
+
+# Check .desktop file
+desktop-file-validate %{_datadir}/applications/udav.desktop
+
+%post
 /sbin/ldconfig
 /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
 
@@ -134,7 +157,7 @@ fi
 %postun -p /sbin/ldconfig
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 
 %files
@@ -167,6 +190,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Apr 15 2013 Dmitrij S. Kryzhevich <krege at land.ru> - 2.1.2-2
+- Fix spec for better cmake use.
+- Make vars in spec be in one style.
+- Add some Russian translation.
+
 * Sun Apr 14 2013 <mycae(a!)gmx.com> 2.1.2-1
 - Update to upstream 2.1.2
 - New upstream has entirely different build system


More information about the scm-commits mailing list