# CONFIGURATION #
####################################################################
-SET( DOC_INSTALL_DIR
- "${CMAKE_INSTALL_PREFIX}/share/doc/packages/${PACKAGE}"
- CACHE PATH "The install dir for documentation (default prefix/share/doc/packages/${PACKAGE})"
- FORCE
-)
+IF( NOT DEFINED DOC_INSTALL_DIR )
+ SET( DOC_INSTALL_DIR
+ "${CMAKE_INSTALL_PREFIX}/share/doc/packages/${PACKAGE}"
+ CACHE PATH "The install dir for documentation (default prefix/share/doc/packages/${PACKAGE})"
+ FORCE
+ )
+ENDIF( NOT DEFINED DOC_INSTALL_DIR )
####################################################################
# INCLUDES #
COMMAND ${CMAKE_MAKE_PROGRAM} svncheck
${AUTOBUILD_COMMAND}
)
-ENDMACRO(GENERATE_PACKAGING)
\ No newline at end of file
+ENDMACRO(GENERATE_PACKAGING)
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
+ -DDOC_INSTALL_DIR=%{_docdir} \
-DLIB=%{_lib} \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
make install DESTDIR=$RPM_BUILD_ROOT
make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
+
+%if 0%{?suse_version}
%suse_update_desktop_file -G "" -C "" package-manager
+%endif
+
make -C po install DESTDIR=$RPM_BUILD_ROOT
# Create filelist with translations
cd ..
%run_ldconfig
%clean
+rm -rf "$RPM_BUILD_ROOT"
%files -f zypp.lang
%defattr(-,root,root)