]> git.pld-linux.org Git - packages/aqsis.git/blobdiff - aqsis.spec
- Fixed build
[packages/aqsis.git] / aqsis.spec
index 6f017162b82c2420b11f29970edfce1ce4f99a7e..92b7acb702fcd779d1851acc00e691b5aa12fc70 100644 (file)
@@ -1,24 +1,18 @@
 # TODO:
-# - Check to see if splitting plugins into several packages makes any sense
-#   (probably not).
 # - Check that everything works as expected.
 # - Remove duplications in %files section.
-# - Fix aqsis-scons-paths.patch so modyfing it after sysconfdir change will
-#   not be needed.
-# - Check why the second stage of compilation ignores CXX and CXXFLAGS and
-#   fix it of course :)
 # - Proper configuration files handling by SPEC.
 # - Fix paths in configuration file.
 Summary:       Aqsis Rendering System
 Summary(pl.UTF-8):     System Renderujący Aqsis
 Name:          aqsis
 Version:       1.2.0
-Release:       0.1
+Release:       0.2
 License:       GPL v2 / LGPL v2.1
 Group:         Applications/Graphics
 Source0:       http://dl.sourceforge.net/aqsis/%{name}-%{version}.tar.gz
 # Source0-md5: ae9bb1c4b22e396fd7ce84ee3e13cb86
-Patch0:                aqsis-scons-paths.patch
+Patch0:                %{name}-scons-paths.patch
 URL:           http://aqsis.sourceforge.net/
 BuildRequires: OpenEXR-devel
 BuildRequires: bison >= 1.35
@@ -30,6 +24,8 @@ BuildRequires:        libstdc++-devel
 BuildRequires: libtiff-devel >= 3.7.1
 BuildRequires: libtool >= 2:1.5
 BuildRequires: libxslt-progs
+BuildRequires: rpmbuild(macros) >= 1.337
+BuildRequires: scons
 BuildRequires: zlib-devel >= 1.1.4
 Provides:      renderman-engine
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -40,9 +36,9 @@ applications for creating high-quality computer imagery using the
 Pixar RenderMan Interface.
 
 %description -l pl.UTF-8
-System renderujący Aqsis składa się z zestawu bibliotek i programów do
-tworzenia wysokiej jakości obrazów komputerowych z użyciem interfejsu
-RenderMan firmy Pixar.
+System Renderujący Aqsis składa się z zestawu bibliotek i programów
+do tworzenia wysokiej jakości obrazów komputerowych z użyciem
+interfejsu RenderMan firmy Pixar.
 
 %package devel
 Summary:       Header files for Aqsis Rendering System
@@ -58,30 +54,35 @@ Requires:   zlib-devel
 Header files for Aqsis Rendering System.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe systemu renderującego Aqsis.
+Pliki nagłówkowe Systemu Renderującego Aqsis.
 
 %prep
 %setup -q
 %patch0 -p1
 
 %build
-export CXX='%{__cxx}'
-export CXXFLAGS='%{rpmcflags}'
-export CC='%{__cc}'
-export CFLAGS='%{rpmcflags}'
-# WARNING! If you'll change the sysconfdir argument below, remember to
-# make apriopriate change in aqsis-scons-paths.patch!
-%{scons} \
-       install_prefix="$RPM_BUILD_ROOT%{_prefix}" \
-       sysconfdir="$RPM_BUILD_ROOT/etc/%{name}"
+# We cannot build the targets here, because 'scons install' fires the entire
+# compilation from the start.
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/%{name},%{name},%{_bindir},%{_libdir},%{_datadir}/%{name}}
 
-%{scons} install_prefix="$RPM_BUILD_ROOT%{_prefix}" install
+# @LIBDIR@, @SHAREDIR@ and @CONFDIR@ comes from the aqsis-scons-paths patch
+sed -e 's:@LIBDIR@:%{_libdir}:g' -i SConstruct
+sed -e 's:@SHAREDIR@:%{_datadir}/%{name}:g' \
+    -e 's:@CONFDIR@:/etc/%{name}:g' \
+    -i platform/default/SConscript
+
+export CXX='%{__cxx}'
+export CXXFLAGS='%{rpmcflags}'
+export CC='%{__cc}'
+export CFLAGS='%{rpmcflags}'
+%scons \
+       install_prefix=$RPM_BUILD_ROOT%{_prefix} \
+       sysconfdir=$RPM_BUILD_ROOT/etc/%{name} \
+       install
 #rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*.la
-#mv $RPM_BUILD_ROOT%{_usr}/etc $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -92,15 +93,15 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ReleaseNotes README
+/etc/%{name}
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_libdir}/lib*.so*
-%dir %{_libdir}/%{name}/
+%dir %{_libdir}/%{name}
 %attr(755,root,root) %{_libdir}/%{name}/*.so
-%dir %{_libdir}/%{name}/plugins/
+%dir %{_libdir}/%{name}/plugins
 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
-%{_libdir}/%{name}/lib*.so*
+%attr(755,root,root) %{_libdir}/%{name}/lib*.so*
 %{_datadir}/%{name}
-/etc/%{name}
 
 %files devel
 %defattr(644,root,root,755)
This page took 0.116534 seconds and 4 git commands to generate.