| 1 | Name: sqlitebrowser
|
|---|
| 2 | Version: 3.12.2
|
|---|
| 3 | Release: 1%{?dist}
|
|---|
| 4 | Summary: Create, design, and edit SQLite database files
|
|---|
| 5 |
|
|---|
| 6 | License: GPLv3+ or MPLv2.0
|
|---|
| 7 | URL: https://github.com/%{name}/%{name}
|
|---|
| 8 | %if !0%{?os2_version}
|
|---|
| 9 | Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|---|
| 10 | %else
|
|---|
| 11 | %scm_source github https://github.com/Tellie/%{name}-os2 %{version}-os2
|
|---|
| 12 | %endif
|
|---|
| 13 | # Unbundle bundled libraries
|
|---|
| 14 | %if !0%{?os2_version}
|
|---|
| 15 | Patch0: sqlitebrowser_unbundle.patch
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: antlr-C++
|
|---|
| 18 | %endif
|
|---|
| 19 | BuildRequires: cmake
|
|---|
| 20 | %if !0%{?os2_version}
|
|---|
| 21 | BuildRequires: desktop-file-utils
|
|---|
| 22 | %endif
|
|---|
| 23 | BuildRequires: gcc-c++
|
|---|
| 24 | %if !0%{?os2_version}
|
|---|
| 25 | BuildRequires: libappstream-glib
|
|---|
| 26 | %endif
|
|---|
| 27 | BuildRequires: make
|
|---|
| 28 | %if !0%{?os2_version}
|
|---|
| 29 | BuildRequires: qcustomplot-qt5-devel
|
|---|
| 30 | BuildRequires: qhexedit2-qt5-devel
|
|---|
| 31 | %endif
|
|---|
| 32 | BuildRequires: sqlite-devel
|
|---|
| 33 | %if !0%{?os2_version}
|
|---|
| 34 | BuildRequires: qscintilla-qt5-devel
|
|---|
| 35 | %endif
|
|---|
| 36 | BuildRequires: qt5-qtbase-devel
|
|---|
| 37 | BuildRequires: qt5-qttools-devel
|
|---|
| 38 | %if !0%{?os2_version}
|
|---|
| 39 | Requires: hicolor-icon-theme
|
|---|
| 40 | %endif
|
|---|
| 41 | %description
|
|---|
| 42 | SQLite Database Browser is a high quality, visual, open source tool to create,
|
|---|
| 43 | design, and edit database files compatible with SQLite.
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | %prep
|
|---|
| 47 | %if !0%{?os2_version}
|
|---|
| 48 | %autosetup -p1
|
|---|
| 49 | %else
|
|---|
| 50 | %scm_setup
|
|---|
| 51 | %endif
|
|---|
| 52 | # Unbundle
|
|---|
| 53 | rm -rf libs/{qcustomplot-source,qhexedit,qscintilla}
|
|---|
| 54 |
|
|---|
| 55 | %build
|
|---|
| 56 | %if 0%{?os2_version}
|
|---|
| 57 | mkdir -p build
|
|---|
| 58 | cd build
|
|---|
| 59 | export LDFLAGS="-Zhigh-mem -Zomf -lcx -lpthread"
|
|---|
| 60 | export CFLAGS="-O2 -g -march=i686"
|
|---|
| 61 | export CXXFLAGS="-O2 -g -march=i686"
|
|---|
| 62 | export FFLAGS="-O2 -g -march=i686"
|
|---|
| 63 | export FCFLAGS="-O2 -g -march=i686"
|
|---|
| 64 |
|
|---|
| 65 | cmake -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \
|
|---|
| 66 | -DCMAKE_SKIP_RPATH:BOOL=YES \
|
|---|
| 67 | -DCMAKE_BUILD_TYPE=Release \
|
|---|
| 68 | -DOS2_USE_CXX_EMXEXP=ON \
|
|---|
| 69 | -DBUILD_STABLE_VERSION=1 \
|
|---|
| 70 | -DENABLE_TESTING=ON \
|
|---|
| 71 | -Wno-dev ..
|
|---|
| 72 | %endif
|
|---|
| 73 |
|
|---|
| 74 | %if !0%{?os2_version}
|
|---|
| 75 | %cmake \
|
|---|
| 76 | -DUSE_QT5=1 \
|
|---|
| 77 | -DENABLE_TESTING=1 \
|
|---|
| 78 | -DFORCE_INTERNAL_QCUSTOMPLOT=OFF \
|
|---|
| 79 | -DFORCE_INTERNAL_QHEXEDIT=OFF \
|
|---|
| 80 | -DQT_INCLUDE_DIR=%{_includedir}/qt5 \
|
|---|
| 81 | ..
|
|---|
| 82 | %endif
|
|---|
| 83 |
|
|---|
| 84 | %if !0%{?os2_version}
|
|---|
| 85 | %cmake_build
|
|---|
| 86 | %else
|
|---|
| 87 | make %{?_smp_mflags}
|
|---|
| 88 | %endif
|
|---|
| 89 |
|
|---|
| 90 | %install
|
|---|
| 91 | %if !0%{?os2_version}
|
|---|
| 92 | %cmake_install
|
|---|
| 93 | %{_bindir}/appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.desktop.appdata.xml
|
|---|
| 94 | desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|---|
| 95 | %else
|
|---|
| 96 | make DESTDIR=$RPM_BUILD_ROOT -C build install
|
|---|
| 97 | install -Dm 0644 src/icons/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/sqlitebrowser.png
|
|---|
| 98 | %endif
|
|---|
| 99 |
|
|---|
| 100 | %check
|
|---|
| 101 | %if !0%{?os2_version}
|
|---|
| 102 | %ctest
|
|---|
| 103 | %endif
|
|---|
| 104 |
|
|---|
| 105 | %files
|
|---|
| 106 | %license LICENSE
|
|---|
| 107 | %doc README.md
|
|---|
| 108 | %if !0%{?os2_version}
|
|---|
| 109 | %{_bindir}/%{name}
|
|---|
| 110 | %{_datadir}/metainfo/%{name}.desktop.appdata.xml
|
|---|
| 111 | %{_datadir}/applications/%{name}.desktop
|
|---|
| 112 | %else
|
|---|
| 113 | %{_bindir}/%{name}.exe
|
|---|
| 114 | %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
|
|---|
| 115 | %endif
|
|---|
| 116 |
|
|---|
| 117 | %changelog
|
|---|
| 118 | * Sat May 15 2021 Elbert Pol <elbert.pol@gmail.com> - 3.12.2-1
|
|---|
| 119 | - First RPM for OS2 v3.12.2
|
|---|