make the spec file look like a spec file, not tested
authordmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Wed, 28 Nov 2007 20:56:10 +0000 (20:56 +0000)
committerdmacvicar <dmacvicar@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Wed, 28 Nov 2007 20:56:10 +0000 (20:56 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/branches/tmp/coolo/qt4-port@42483 e0cc52ee-31ee-0310-8b87-e83c4596d67c

CMakeLists.txt
yast2-qt4.spec.in

index 2910e87..e9c44d9 100644 (file)
@@ -4,7 +4,7 @@ SET( CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/Modules" ${CMAKE_MOD
 SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -Wall -Woverloaded-virtual" )
 SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -O3 -Wall" )
 
-SET( PACKAGE "yast2-qt4" )
+SET( RPMNAME "yast2-qt4" )
 
 FIND_PACKAGE(Qt4 REQUIRED)
 FIND_PACKAGE(Yast REQUIRED)
index 2d768e2..73945f8 100644 (file)
@@ -19,16 +19,26 @@ Obsoletes:  y2qt
 %description
 -
 
-@PREP@
+%build
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
+      -DLIB=%{_lib} \
+      -DCMAKE_C_FLAGS="%{optflags}" \
+      -DCMAKE_CXX_FLAGS="%{optflags}" \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DCMAKE_SKIP_RPATH=1 \
+      ..
+make %{?jobs:-j %jobs}
+
+%install
+cd build
+make install DESTDIR=$RPM_BUILD_ROOT
+cd ..
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
 
-@BUILD-QT@
-
-@INSTALL@
-rm -f $RPM_BUILD_ROOT/@plugindir@/libpy2qt4.la
-rm -f $RPM_BUILD_ROOT/@plugindir@/libpy2qt4_pkg.la
-
-
-@CLEAN@
 
 %if 0%{?suse_version} <= 1010
 %define _xorg7fonts /usr/X11R6/lib/X11/fonts
@@ -38,15 +48,15 @@ rm -f $RPM_BUILD_ROOT/@plugindir@/libpy2qt4_pkg.la
 
 %files
 %defattr (-, root, root)
-@plugindir@/libpy2qt4.so.*
-@plugindir@/libpy2qt4.so
-@plugindir@/libpy2qt4_pkg.so.*
-@plugindir@/libpy2qt4_pkg.so
-@imagedir@
+@YAST_PLUGIN_DIR@/libpy2qt4.so.*
+@YAST_PLUGIN_DIR@/libpy2qt4.so
+@YAST_PLUGIN_DIR@/libpy2qt4_pkg.so.*
+@YAST_PLUGIN_DIR@/libpy2qt4_pkg.so
+@YAST_IMAGE_DIR@
 %dir %{_xorg7fonts}/uni
 %verify(not md5 size mtime) %{_xorg7fonts}/uni/fonts.dir
 %{_xorg7fonts}/uni/newunifont.pcf.gz
 %{_xorg7fonts}/uni/unifont.pcf.gz
-%dir @ydatadir@
-@ydatadir@/lang_fonts
-%doc @docdir@
+%dir @YAST_DATA_DIR@
+@YAST_DATA_DIR@/lang_fonts
+%doc %{prefix}/share/doc/packages/%{name}