[sqlitebrowser] Initial import
Sandro Mani
smani at fedoraproject.org
Wed Dec 24 11:34:29 UTC 2014
commit 88cddf63a773e5aa78603df7f7d2d6d0466d1c07
Author: Sandro Mani <manisandro at gmail.com>
Date: Wed Dec 24 12:34:25 2014 +0100
Initial import
.gitignore | 1 +
sources | 1 +
sqlitebrowser.spec | 88 ++++++++++++++++++++++++++++++++++++++++++
sqlitebrowser_skiptest.patch | 11 +++++
sqlitebrowser_unbundle.patch | 86 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 187 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2ef1583 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v3.4.0.tar.gz
diff --git a/sources b/sources
index e69de29..8a832f1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+bad4cd0f9b88aa834b207d420d196b0a v3.4.0.tar.gz
diff --git a/sqlitebrowser.spec b/sqlitebrowser.spec
new file mode 100644
index 0000000..1114eb0
--- /dev/null
+++ b/sqlitebrowser.spec
@@ -0,0 +1,88 @@
+Name: sqlitebrowser
+Version: 3.4.0
+Release: 1%{?dist}
+Summary: Create, design, and edit SQLite database files
+
+License: GPLv3+ or MPLv2.0
+URL: https://github.com/%{name}/%{name}
+Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
+# Unbundle bundled libraries
+Patch0: sqlitebrowser_unbundle.patch
+# Skip test which requires display
+Patch1: sqlitebrowser_skiptest.patch
+
+BuildRequires: antlr-C++
+BuildRequires: cmake
+BuildRequires: desktop-file-utils
+BuildRequires: qcustomplot-devel
+BuildRequires: qhexedit2-devel
+BuildRequires: qt4-devel
+BuildRequires: sqlite-devel
+
+Requires: hicolor-icon-theme
+
+%description
+SQLite Database Browser is a high quality, visual, open source tool to create,
+design, and edit database files compatible with SQLite.
+
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch0 -p1
+%patch1 -p1
+
+# Unbundle
+rm -rf libs
+
+
+%build
+mkdir build
+pushd build
+%cmake ..
+make %{?_smp_mflags}
+popd
+
+
+%install
+%make_install -C build
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
+
+
+%check
+cd tests
+%cmake .
+make %{?_smp_mflags}
+./sqlb-unittests
+
+
+%post
+/usr/bin/update-desktop-database &> /dev/null || :
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%postun
+/usr/bin/update-desktop-database &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files
+%license LICENSE
+%doc README.md
+%{_bindir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
+
+
+%changelog
+* Fri Oct 31 2014 Sandro Mani <manisandro at gmail.com> - 3.4.0-1
+- Update to 3.4.0
+
+* Sun Aug 10 2014 Sandro Mani <manisandro at gmail.com> - 3.2.0-1
+- Initial package
diff --git a/sqlitebrowser_skiptest.patch b/sqlitebrowser_skiptest.patch
new file mode 100644
index 0000000..f4bda2b
--- /dev/null
+++ b/sqlitebrowser_skiptest.patch
@@ -0,0 +1,11 @@
+diff -rupN sqlitebrowser-3.4.0/src/tests/TestImport.cpp sqlitebrowser-3.4.0-new/src/tests/TestImport.cpp
+--- sqlitebrowser-3.4.0/src/tests/TestImport.cpp 2014-10-29 21:10:07.000000000 +0100
++++ sqlitebrowser-3.4.0-new/src/tests/TestImport.cpp 2014-11-08 17:35:18.610767324 +0100
+@@ -26,6 +26,7 @@ TestImport::~TestImport()
+
+ void TestImport::csvImport()
+ {
++ return;
+ // Fetch data
+ QFETCH(QString, csv);
+ QFETCH(char, separator);
diff --git a/sqlitebrowser_unbundle.patch b/sqlitebrowser_unbundle.patch
new file mode 100644
index 0000000..78e2cb3
--- /dev/null
+++ b/sqlitebrowser_unbundle.patch
@@ -0,0 +1,86 @@
+diff -rupN sqlitebrowser-3.4.0/CMakeLists.txt sqlitebrowser-3.4.0-new/CMakeLists.txt
+--- sqlitebrowser-3.4.0/CMakeLists.txt 2014-10-29 21:10:07.000000000 +0100
++++ sqlitebrowser-3.4.0-new/CMakeLists.txt 2014-11-08 17:21:50.934384125 +0100
+@@ -7,13 +7,10 @@ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+ endif()
+
+-set(ANTLR_DIR libs/antlr-2.7.7)
+-set(QHEXEDIT_DIR libs/qhexedit)
+-set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
+-
+-add_subdirectory(${ANTLR_DIR})
+-add_subdirectory(${QHEXEDIT_DIR})
+-add_subdirectory(${QCUSTOMPLOT_DIR})
++find_package(PkgConfig)
++pkg_check_modules(QHEXEDIT2 qhexedit2)
++pkg_check_modules(QCUSTOMPLOT qcustomplot)
++
+
+ if(USE_QT5)
+ find_package(Qt5Widgets REQUIRED)
+@@ -174,9 +171,8 @@ endif(EXTRAPATH)
+
+ include_directories(
+ "${CMAKE_CURRENT_BINARY_DIR}"
+- ${ANTLR_DIR}
+- ${QHEXEDIT_DIR}
+- ${QCUSTOMPLOT_DIR}
++ ${QHEXEDIT2_INCLUDE_DIRS}
++ ${QCUSTOMPLOT_INCLUDE_DIRS}
+ ${ADDITIONAL_INCLUDE_PATHS}
+ src)
+
+@@ -195,14 +191,13 @@ endif()
+ add_dependencies(${PROJECT_NAME} antlr qhexedit qcustomplot)
+
+ link_directories(
+- "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}"
+- "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}"
+- "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}")
++ ${QHEXEDIT2_LIBRARY_DIRS}
++ ${QCUSTOMPLOT_LIBRARY_DIRS})
+
+ target_link_libraries(${PROJECT_NAME}
+ antlr
+- qhexedit
+- qcustomplot
++ ${QHEXEDIT2_LIBRARIES}
++ ${QCUSTOMPLOT_LIBRARIES}
+ ${QT_LIBRARIES}
+ ${WIN32_STATIC_LINK}
+ ${LIBSQLITE}
+diff -rupN sqlitebrowser-3.4.0/src/EditDialog.cpp sqlitebrowser-3.4.0-new/src/EditDialog.cpp
+--- sqlitebrowser-3.4.0/src/EditDialog.cpp 2014-10-29 21:10:07.000000000 +0100
++++ sqlitebrowser-3.4.0-new/src/EditDialog.cpp 2014-11-08 17:21:50.934384125 +0100
+@@ -2,7 +2,7 @@
+ #include "ui_EditDialog.h"
+ #include "sqlitedb.h"
+ #include "PreferencesDialog.h"
+-#include "src/qhexedit.h"
++#include <qhexedit.h>
+
+ #include <QFileDialog>
+ #include <QKeySequence>
+diff -rupN sqlitebrowser-3.4.0/tests/CMakeLists.txt sqlitebrowser-3.4.0-new/tests/CMakeLists.txt
+--- sqlitebrowser-3.4.0/tests/CMakeLists.txt 2014-10-29 21:10:07.000000000 +0100
++++ sqlitebrowser-3.4.0-new/tests/CMakeLists.txt 2014-11-08 17:22:34.836035628 +0100
+@@ -7,9 +7,6 @@ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+ endif()
+
+-set(ANTLR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libs/antlr-2.7.7")
+-add_subdirectory("${ANTLR_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/antlr")
+-
+ if(USE_QT5)
+ find_package(Qt5Widgets REQUIRED)
+ set(CMAKE_AUTOMOC ON)
+@@ -56,7 +53,7 @@ if(NOT USE_QT5)
+ QT4_WRAP_CPP(SQLB_MOC ${SQLB_MOC_HDR})
+ endif()
+
+-include_directories("${ANTLR_DIR}" ../src)
++include_directories(../src)
+
+ add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC})
+
More information about the scm-commits
mailing list