more build fixes
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 13 Mar 2008 12:56:54 +0000 (12:56 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 13 Mar 2008 12:56:54 +0000 (12:56 +0000)
cmake/modules/ZyppCommon.cmake
libzypp.spec.cmake

index 530988c5a58f24a150f010ce91280d152e8017dd..f63d55e56d1371c4cbe1c91b78f68a4f0abd1220 100644 (file)
@@ -38,11 +38,13 @@ MESSAGE( "** Manual files will be installed in ${MANDIR}" )
 # 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                                                         #
@@ -143,4 +145,4 @@ MACRO(GENERATE_PACKAGING PACKAGE VERSION)
     COMMAND ${CMAKE_MAKE_PROGRAM} svncheck
     ${AUTOBUILD_COMMAND}
   )
-ENDMACRO(GENERATE_PACKAGING)
\ No newline at end of file
+ENDMACRO(GENERATE_PACKAGING)
index 1fb2e4f86f1e9235c8022e598294deee2d168a3a..7e9808f5d9ae1e4418a322c751eecc6760edf8ed 100644 (file)
@@ -97,6 +97,7 @@ Authors:
 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}" \
@@ -114,7 +115,11 @@ cd build
 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 ..
@@ -130,6 +135,7 @@ if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
 %run_ldconfig
 
 %clean
+rm -rf "$RPM_BUILD_ROOT"
 
 %files -f zypp.lang
 %defattr(-,root,root)