Browse Source

update: cmake, qjson

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1640 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 14 years ago
parent
commit
3810e39532
2 changed files with 72 additions and 10 deletions
  1. 66 7
      c/cmake/cmake-vl.spec
  2. 6 3
      q/qjson/qjson-vl.spec

+ 66 - 7
c/cmake/cmake-vl.spec

@@ -1,16 +1,24 @@
+# Set to bcond_with or use --without gui to disable qt4 gui build
+%bcond_without gui
+
 Name: cmake
 Summary: Cross-platform make system
+Summary(ja): クロスプラットフォームな Make システム
 Version: 2.8.2
-Release: 1%{?_dist_release}
+Release: 2%{?_dist_release}
 
-License: Insight Consortium
 Group: Development/Tools
+License: BSD
 URL: http://www.cmake.org/
 
 Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz
 Source1: macros.cmake
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
+%if %{with gui}
+BuildRequires: qt4-devel, desktop-file-utils
+%define qt_gui --qt-gui
+%endif
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -23,17 +31,32 @@ environment of your choice. CMake is quite sophisticated: it is possible
 to support complex environments requiring system configuration, pre-processor 
 generation, code generation, and template instantiation.
 
+%package        gui
+Summary:        Qt GUI for %{name}
+Group:          Development/Tools
+Requires:       %{name} = %{version}-%{release}
+Requires(post): desktop-file-utils, shared-mime-info
+Requires(postun): desktop-file-utils, shared-mime-info
+
+%description    gui
+The %{name}-gui package contains the Qt based GUI for CMake.
+
+
 %prep
 %setup -q
+# Fixup permissions
+find -name \*.h -o -name \*.cxx -print0 | xargs -0 chmod -x
 
 %build
-./bootstrap --prefix=%{_prefix} --datadir=/share/CMake --mandir=/share/man
-make %{?_smp_mflags}
+./bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \
+    --mandir=/share/man --with-system-libs %{?qt_gui}
+make VERBOSE=1 %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%makeinstall DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
 
+find $RPM_BUILD_ROOT/%{_datadir}/%{name}/Modules -type f | xargs chmod -x
 rm -rf $RPM_BUILD_ROOT/usr/doc
 
 # RPM macros
@@ -41,20 +64,56 @@ install -p -m0644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.cmake
 sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.cmake
 touch -r %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.cmake
 
+%if %{with gui}
+# Desktop file
+desktop-file-install --delete-original \
+  --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
+  $RPM_BUILD_ROOT/%{_datadir}/applications/CMake.desktop
+%endif
+
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with gui}
+%post gui
+update-desktop-database &> /dev/null || :
+update-mime-database %{_datadir}/mime &> /dev/null || :
+
+%postun gui
+update-desktop-database &> /dev/null || :
+update-mime-database %{_datadir}/mime &> /dev/null || :
+%endif
+
+
 %files
 %defattr(-,root,root)
 %doc CMakeLogo.gif ChangeLog.* Copyright.txt
 %doc Docs/*
 %doc Example/
 %config(noreplace) %{_sysconfdir}/rpm/macros.cmake
-%{_bindir}/*
-%{_datadir}/CMake/
+%{_bindir}/ccmake
+%{_bindir}/cmake
+%{_bindir}/cpack
+%{_bindir}/ctest
+%{_datadir}/%{name}/
 %{_mandir}/man1/*
 
+%if %{with gui}
+%files gui
+%defattr(-,root,root,-)
+%{_bindir}/cmake-gui
+%{_datadir}/applications/CMake.desktop
+%{_datadir}/mime/packages/cmakecache.xml
+%{_datadir}/pixmaps/CMakeSetup32.png
+%endif
+
+
 %changelog
+* Sun Aug 22 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.2-2
+- generate gui package
+- renamed module directory
+
 * Sun Jul 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.2-1
 - new upstream release
 

+ 6 - 3
q/qjson/qjson-vl.spec

@@ -1,7 +1,7 @@
 Name:           qjson
 Summary:        A qt-based library that maps JSON data to QVariant objects
 Version:        0.7.1
-Release:        3%{?_dist_release}
+Release:        4%{?_dist_release}
 
 Group:          System Environment/Libraries
 License:        GPLv2+
@@ -39,7 +39,7 @@ developing applications that use %{name}.
 mkdir -p %{_target_platform}
 pushd %{_target_platform}
 %cmake -DQJSON_BUILD_TESTS=1 \
-    -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/CMake/Modules/ \
+    -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules/ \
     ..
 cd %{_builddir}/%{buildsubdir}/doc
 doxygen
@@ -78,10 +78,13 @@ rm -rf %{buildroot}
 %doc doc/html
 %{_includedir}/qjson/
 %{_libdir}/pkgconfig/*.pc
-%{_datadir}/CMake/Modules/FindQJSON.cmake
+%{_datadir}/cmake/Modules/FindQJSON.cmake
 %{_libdir}/*.so
 
 %changelog
+* Sun Aug 22 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.1-4
+- re-fixed CMAKE_MODULES_INSTALL_DIR
+
 * Tue Aug 17 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.7.1-3
 - fixed CMAKE_MODULES_INSTALL_DIR