source: spec/trunk/SPECS/sqlitebrowser.spec@ 1768

Last change on this file since 1768 was 1768, checked in by tellie, 5 years ago

sqlitebrowser: Add spec file

File size: 2.9 KB
Line 
1Name: sqlitebrowser
2Version: 3.12.2
3Release: 1%{?dist}
4Summary: Create, design, and edit SQLite database files
5
6License: GPLv3+ or MPLv2.0
7URL: https://github.com/%{name}/%{name}
8%if !0%{?os2_version}
9Source0: 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}
15Patch0: sqlitebrowser_unbundle.patch
16
17BuildRequires: antlr-C++
18%endif
19BuildRequires: cmake
20%if !0%{?os2_version}
21BuildRequires: desktop-file-utils
22%endif
23BuildRequires: gcc-c++
24%if !0%{?os2_version}
25BuildRequires: libappstream-glib
26%endif
27BuildRequires: make
28%if !0%{?os2_version}
29BuildRequires: qcustomplot-qt5-devel
30BuildRequires: qhexedit2-qt5-devel
31%endif
32BuildRequires: sqlite-devel
33%if !0%{?os2_version}
34BuildRequires: qscintilla-qt5-devel
35%endif
36BuildRequires: qt5-qtbase-devel
37BuildRequires: qt5-qttools-devel
38%if !0%{?os2_version}
39Requires: hicolor-icon-theme
40%endif
41%description
42SQLite Database Browser is a high quality, visual, open source tool to create,
43design, 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
53rm -rf libs/{qcustomplot-source,qhexedit,qscintilla}
54
55%build
56%if 0%{?os2_version}
57mkdir -p build
58cd build
59export LDFLAGS="-Zhigh-mem -Zomf -lcx -lpthread"
60export CFLAGS="-O2 -g -march=i686"
61export CXXFLAGS="-O2 -g -march=i686"
62export FFLAGS="-O2 -g -march=i686"
63export FCFLAGS="-O2 -g -march=i686"
64
65cmake -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
87make %{?_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
94desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
95%else
96make DESTDIR=$RPM_BUILD_ROOT -C build install
97install -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
Note: See TracBrowser for help on using the repository browser.