gpick/gpick.spec

83 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

2021-07-01 18:22:40 +00:00
%global commit 0e858d33fd28d98d2689d0ebb92c975729a9f7bc
%global shortcommit %%(c=%%{commit}; echo ${c:0:7})
%global date 20210528
Name: gpick
2017-09-25 02:52:21 +00:00
Version: 0.2.6
2021-07-01 18:22:40 +00:00
Release: %autorelease -b 4 -s %{date}git%{shortcommit}
Summary: Advanced color picker
2013-04-18 16:57:10 +00:00
License: BSD
URL: http://gpick.org
%{?shortcommit:
2021-07-01 18:22:40 +00:00
Source: https://github.com/thezbyg/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz}
2017-09-25 02:52:21 +00:00
%{!?shortcommit:
2020-12-28 19:36:18 +00:00
Source: https://github.com/thezbyg/%{name}/archive/%{name}-%{version}.tar.gz#/%{name}-%{version}.tar.gz}
2019-01-30 22:34:25 +00:00
BuildRequires: gcc-c++
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
2021-07-01 18:22:40 +00:00
BuildRequires: gettext
BuildRequires: libappstream-glib
2020-12-28 19:36:18 +00:00
BuildRequires: make
BuildRequires: pkgconfig(dbus-glib-1)
2020-12-28 19:36:18 +00:00
BuildRequires: pkgconfig(expat)
2017-09-25 02:52:21 +00:00
BuildRequires: pkgconfig(gtk+-3.0)
2020-12-28 19:36:18 +00:00
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(lua)
BuildRequires: pkgconfig(openthreads)
BuildRequires: ragel
2020-12-28 19:36:18 +00:00
2017-08-18 18:58:02 +00:00
2013-04-18 16:57:10 +00:00
%description
Advanced color picker
%prep
2017-09-25 02:52:21 +00:00
%{?shortcommit:
%autosetup -p1 -n %{name}-%{commit}}
2017-09-25 02:52:21 +00:00
%{!?shortcommit:
2020-12-28 19:36:18 +00:00
%autosetup -n %name-%{name}-%{version}}
mkdir .git
2013-04-18 16:57:10 +00:00
# Delete external libraries and only use system dependencies to build GPick
rm -rf extern
echo "INTERNAL_EXPAT=False" >> user-config.py
echo "INTERNAL_LUA=False" >> user-config.py
2013-05-15 18:12:16 +00:00
echo "LOCALEDIR=\"%{_datadir}/locale\"" >> user-config.py
2013-04-18 16:57:10 +00:00
%build
%cmake \
-DCFLAGS="%{optflags} -Wl,--as-needed" \
2020-12-28 19:36:18 +00:00
-DCXXFLAGS="%%{optflags} -Wl,--as-needed --std=c++17" \
-DLDFLAGS="%%{optflags} -Wl,--as-needed"
2020-12-28 19:36:18 +00:00
%cmake_build
2013-04-18 16:57:10 +00:00
%install
2020-12-28 19:36:18 +00:00
%cmake_install
2019-02-23 08:38:56 +00:00
# copy libraries
2021-07-01 18:22:40 +00:00
#mkdir -p %%{buildroot}%%{_libdir}
#cp -p %%{_builddir}/%%{name}-%%{version}/*.so %%{buildroot}%%{_libdir}
2019-02-23 08:38:56 +00:00
%check
2017-09-25 02:52:21 +00:00
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml
2013-05-15 18:12:16 +00:00
%find_lang %{name}
%files -f %{name}.lang
2013-04-18 16:57:10 +00:00
%doc %{_docdir}/%{name}/copyright
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_metainfodir}/%{name}.appdata.xml
2013-04-18 16:57:10 +00:00
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
2013-04-18 16:57:10 +00:00
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man1/%{name}.1.*
%changelog
2021-07-01 18:22:40 +00:00
%autochangelog