diff --git a/sqlitebrowser.changes b/sqlitebrowser.changes index 709931f..848e7b1 100644 --- a/sqlitebrowser.changes +++ b/sqlitebrowser.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Apr 10 09:28:05 UTC 2016 - mpluskal@suse.com + +- Drop some build dependencies + * autotools are not used +- Add macros for icons +- Add correct dependencies for post/postun macros +- Use cmake macros +- Drop some conditional build dependencies for unsupported releases + ------------------------------------------------------------------- Sat Apr 9 15:32:00 UTC 2016 - mailaender@opensuse.org diff --git a/sqlitebrowser.spec b/sqlitebrowser.spec index 2076c6d..d0b89e2 100644 --- a/sqlitebrowser.spec +++ b/sqlitebrowser.spec @@ -25,18 +25,17 @@ Group: Productivity/Office/Organizers Url: http://sqlitebrowser.org/ Source0: https://github.com/sqlitebrowser/sqlitebrowser/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: sqlitebrowser.1 -BuildRequires: autoconf -BuildRequires: automake BuildRequires: cmake -BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: sqlite3-devel BuildRequires: update-desktop-files +BuildRequires: pkgconfig(glib-2.0) +Requires(post): hicolor-icon-theme +Requires(post): update-desktop-files +Requires(postun): hicolor-icon-theme +Requires(postun): update-desktop-files BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} -BuildRequires: update-desktop-files -%endif %if 0%{?suse_version} > 1320 BuildRequires: libqt5-linguist-devel BuildRequires: pkgconfig(Qt5Gui) @@ -47,9 +46,6 @@ BuildRequires: pkgconfig(Qt5Widgets) %else BuildRequires: libqt4-devel %endif -%if 0%{?suse_version} > 1100 -BuildRequires: pkgconfig(glib-2.0) -%endif %description SQLite Database Browser is a freeware, public domain, open source visual tool @@ -74,19 +70,18 @@ to: %setup -q %build -export CXXFLAGS="%optflags" -cmake \ -%if 0%{?suse_version} > 1320 --DUSE_QT5=true \ -%endif --DCMAKE_INSTALL_PREFIX=%{_prefix} . -make %{?_smp_mflags} VERBOSE=1 +%cmake \ + %if 0%{?suse_version} > 1320 + -DUSE_QT5=true \ + %endif + -DCMAKE_BUILD_TYPE=RelWithDebInfo +make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install +%cmake_install mkdir -p %{buildroot}/%{_bindir} %{buildroot}/%{_datadir}/{applications,pixmaps} -install -Dm644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/%{name}.1 -install -m644 images/%{name}.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png +install -D -m 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/%{name}.1 +install -m 0644 images/%{name}.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop << EOF [Desktop Entry] Categories=Application;Network;GNOME;GTK;System;X-SuSE-ServiceConfiguration; @@ -98,23 +93,21 @@ Terminal=false Type=Application Icon=%{name} EOF -%if 0%{?suse_version} %suse_update_desktop_file %{name} -%endif -%if 0%{?suse_version} > 1130 %post %desktop_database_post +%icon_theme_cache_post %postun %desktop_database_postun -%endif +%icon_theme_cache_postun %files %defattr(-,root,root) %doc README.md LICENSE currentrelease -%{_mandir}/man1/%{name}.1* -%{_bindir}/* +%{_mandir}/man1/%{name}.1%{ext_man} +%{_bindir}/%{name} %{_datadir}/applications/* %dir %{_datadir}/appdata %{_datadir}/appdata/%{name}.desktop.appdata.xml