Blob Blame History Raw
%global commit  0f28d18cbee916ff4f0ca809f567035bc7867605
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           xapps
Version:        1.0.0
Release:        0.2.git%{shortcommit}%{?dist}
Summary:        Common files for XApp desktop apps

License:        LGPLv2+
URL:            https://github.com/linuxmint
Source0:        %url/%{name}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz      

BuildRequires:  gnome-common
BuildRequires:  glib2-devel
BuildRequires:  intltool
BuildRequires:  gobject-introspection-devel
BuildRequires:  libX11-devel
BuildRequires:  gtk3-devel
BuildRequires:  libgnomekbd-devel
Requires:       python-gobject-base
Requires:       inxi
Requires:       xdg-utils
Requires:       fpaste

%description
This package includes files that are shared between several XApp
apps (i18n files and configuration schemas).

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
Development libraries and header files for
developing XApp apps.

%prep
%autosetup -p1 -n %{name}-%{commit}
NOCONFIGURE=1 ./autogen.sh

%build
%configure
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool

%make_build V=1


%install
rm -rf $RPM_BUILD_ROOT
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'


%post
/sbin/ldconfig
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
/sbin/ldconfig
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 || :
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :


%files
%license COPYING
%{_bindir}/pastebin
%{_bindir}/upload-system-info
%{_bindir}/xfce4-set-wallpaper
%{_libdir}/libxapp.so.*
%{_libdir}/girepository-1.0/XApp-1.0.typelib
%{_datadir}/xapps/
%{_datadir}/glib-2.0/schemas/org.x.apps.*.xml
%{_datadir}/icons/hicolor/scalable/actions/xapp-*-symbolic.svg

%files devel
%{_includedir}/*
%{_libdir}/libxapp.so
%{_libdir}/pkgconfig/xapp.pc
%{_datadir}/gir-1.0/XApp-1.0.gir


%changelog
* Tue Oct 11 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.0-0.2.git0f28d18
- fix review issues

* Sat Oct 08 2016 Leigh Scott <leigh123linux@googlemail.com> - 1.0.0-0.1.git7e7567a
- first build