LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File haguichi.spec of Package haguichi (Project home:ztefn)

#
# spec file for package haguichi
#
# Copyright (c) 2013-2014 Stephen Brandt
# Copyright (c) 2010-2012 Adam Mizerski
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           haguichi
Version:        1.0.24
Release:        0
License:        GPL-2.0+
Summary:        Haguichi
Url:            http://www.haguichi.net/
Group:          Productivity/Networking/Other
Source:         %{name}-%{version}-clr4.0.tar.gz
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig(gconf-sharp-2.0)
BuildRequires:  pkgconfig(glib-sharp-2.0)
BuildRequires:  pkgconfig(gtk-sharp-2.0)
BuildRequires:  pkgconfig(mono)
BuildRequires:  pkgconfig(ndesk-dbus-1.0)
BuildRequires:  pkgconfig(ndesk-dbus-glib-1.0)
BuildRequires:  pkgconfig(notify-sharp)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       hicolor-icon-theme
BuildArch:      noarch

%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%if 0%{?fedora_version}
BuildRequires:  desktop-file-utils
%endif

%if 0%{?suse_version}
Requires:       %{name}-lang = %{version}
%lang_package
%endif

%description
Haguichi provides a graphical frontend for Hamachi on Linux.

%prep
%setup -q
%configure --libdir=%{_prefix}/lib

%build
make

%install
make DESTDIR=%{buildroot} install
rm -r %{buildroot}%{_datadir}/icons/{Humanity,ubuntu-mono-dark,ubuntu-mono-light}
rm -r %{buildroot}%{_datadir}/icons/hicolor/{12x12,18x18}

%find_lang %{name}

%if 0%{?suse_version}
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{buildroot}%{_datadir}/gnome/autostart/%{name}.desktop
%endif

%if 0%{?fedora_version}
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
desktop-file-validate %{buildroot}%{_datadir}/gnome/autostart/%{name}.desktop
%endif

%clean
rm -rf %{buildroot}


%if 0%{?suse_version}
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%endif

%if 0%{?fedora_version}
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
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 || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif


%if 0%{?suse_version}
%files
%endif
%if 0%{?fedora_version}
%files -f %{name}.lang
%endif
%defattr(-,root,root)
%{_bindir}/%{name}
%dir %{_prefix}/lib/haguichi
%{_prefix}/lib/haguichi/Haguichi.exe
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/autostart
%{_datadir}/gnome/autostart/%{name}.desktop
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/hicolor/*/status/%{name}-*.png

%if 0%{?suse_version}
%files lang -f %{name}.lang
%endif

%changelog