From: Arkadiusz Miƛkiewicz Date: Fri, 30 Jul 2010 20:56:24 +0000 (+0000) Subject: - raw X-Git-Tag: auto/th/avogadro-1_0_0-2~7 X-Git-Url: http://git.pld-linux.org/?p=packages%2Favogadro.git;a=commitdiff_plain;h=638a5511ba5edf64d0dd8005779925b66593e7be - raw Changed files: avogadro-sip.patch -> 1.1 avogadro.spec -> 1.1 --- 638a5511ba5edf64d0dd8005779925b66593e7be diff --git a/avogadro-sip.patch b/avogadro-sip.patch new file mode 100644 index 0000000..8640911 --- /dev/null +++ b/avogadro-sip.patch @@ -0,0 +1,14 @@ +diff -ur avogadro-1.0.0/cmake/modules/PythonDeps.cmake avogadro-1.0.0-sip410/cmake/modules/PythonDeps.cmake +--- avogadro-1.0.0/cmake/modules/PythonDeps.cmake 2009-10-23 21:06:32.000000000 +0200 ++++ avogadro-1.0.0-sip410/cmake/modules/PythonDeps.cmake 2010-02-10 03:03:12.000000000 +0100 +@@ -67,6 +67,10 @@ + message(STATUS "using sip version 4.9...") + add_definitions( -DSIP_4_8 ) + endif (${SIP_VERSION} MATCHES "4.9") ++ if (${SIP_VERSION} MATCHES "4.10") ++ message(STATUS "using sip version 4.10...") ++ add_definitions( -DSIP_4_8 ) ++ endif (${SIP_VERSION} MATCHES "4.10") + else (EXISTS ${PYTHON_INCLUDE_PATH}/sip.h) + message(STATUS "sip.h header NOT found - Python support disabled") + # message(STATUS "debian/ubuntu: install the python-sip4-dev package.") diff --git a/avogadro.spec b/avogadro.spec new file mode 100644 index 0000000..c8a4483 --- /dev/null +++ b/avogadro.spec @@ -0,0 +1,108 @@ +Summary: An advanced molecular editor for chemical purposes +Name: avogadro +Version: 1.0.0 +Release: 0.1 +License: GPL v2 +Group: Applications/Editors +URL: http://avogadro.openmolecules.net/ +Source0: http://downloads.sourceforge.net/avogadro/%{name}-%{version}.tar.bz2 +# fix build with sip 4.10 +Patch0: %{name}-sip.patch +BuildRequires: boost-devel >= 1.35 +BuildRequires: cmake >= 2.6.0 +BuildRequires: desktop-file-utils +BuildRequires: docbook-utils +BuildRequires: eigen2-devel >= 2.0.3 +BuildRequires: glew-devel >= 1.5.0 +BuildRequires: numpy +BuildRequires: openbabel-devel >= 2.2.2 +BuildRequires: qt4-build >= 4.5.1 +BuildRequires: sip-devel +Requires: %{name}-libs = %{version}-%{release} +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +An advanced molecular editor designed for cross-platform use in +computational chemistry, molecular modeling, bioinformatics, materials +science, and related areas, which offers flexible rendering and a +powerful plugin architecture. + + +%package libs +Summary: Shared libraries for Avogadro +Group: Libraries + +%description libs +This package contains the shared libraries for the molecular editor +Avogadro. + +%package devel +Summary: Development files for Avogadro +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +Requires: + +%description devel +This package contains files to develop applications using Avogadros +libraries. + +%prep +%setup -q +%patch0 -p1 -b .sip410 + + +%build +install -d build +cd build +%{cmake} \ + -DENABLE_GLSL=ON \ + -DENABLE_PYTHON=ON \ + -DENABLE_UPDATE_CHECKER=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLIB_INSTALL_DIR=%{_libdir} \ + .. +cd .. +%{__make} -C %{_target_platform} + + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} + +# system menu entry +desktop-file-install --vendor="" \ + --dir=$RPM_BUILD_ROOT%{_desktopdir} \ + $RPM_BUILD_ROOT%{_desktopdir}/avogadro.desktop + + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(644,root,root,755) +%doc AUTHORS ChangeLog COPYING +%attr(755,root,root) %{_bindir}/%{name} +%{_datadir}/%{name} +%{_pixmapsdir}/%{name}-icon.png +%{_desktopdir}/%{name}.desktop + + +%files devel +%defattr(644,root,root,755) +%{_datadir}/lib%{name} +%{_includedir}/%{name} +%{_libdir}/*.so + + +%files libs +%defattr(644,root,root,755) +%{py_sitedir}/Avogadro.so +%{_libdir}/%{name} +%attr(755,root,root) %{_libdir}/*.so.*