| 1 | %define name hexchat |
|---|
| 2 | %define version 2.12.0 |
|---|
| 3 | %define release 1%{?_dist_release} |
|---|
| 4 | |
|---|
| 5 | Summary: IRC client based on XChat |
|---|
| 6 | Summary(ja): XChat をベースにした IRC クライアント |
|---|
| 7 | Name: %{name} |
|---|
| 8 | Version: %{version} |
|---|
| 9 | Release: %{release} |
|---|
| 10 | Group: Applications/Internet |
|---|
| 11 | License: GPLv2 |
|---|
| 12 | URL: http://hexchat.github.io/ |
|---|
| 13 | |
|---|
| 14 | Source0: http://dl.hexchat.net/hexchat/hexchat-%{version}.tar.xz |
|---|
| 15 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 16 | |
|---|
| 17 | Patch0: xchat-1.8.7-use-sysconf-to-detect-cpus.patch |
|---|
| 18 | Patch110: http://takuo.jp/junk/xchat/99_x_dialog.dpatch |
|---|
| 19 | Patch200: hexchat-2.9.5_defaultserver-vine.patch |
|---|
| 20 | |
|---|
| 21 | BuildRequires: autoconf |
|---|
| 22 | BuildRequires: dbus-devel |
|---|
| 23 | BuildRequires: dbus-glib-devel |
|---|
| 24 | BuildRequires: desktop-file-utils |
|---|
| 25 | BuildRequires: gettext |
|---|
| 26 | BuildRequires: glib2-devel >= 2.10.0 |
|---|
| 27 | BuildRequires: gtk2-devel >= 2.10.0 |
|---|
| 28 | BuildRequires: openssl-devel |
|---|
| 29 | BuildRequires: pciutils-devel |
|---|
| 30 | BuildRequires: perl |
|---|
| 31 | BuildRequires: pkgconfig |
|---|
| 32 | BuildRequires: python-devel |
|---|
| 33 | BuildRequires: tcl |
|---|
| 34 | |
|---|
| 35 | %description |
|---|
| 36 | HexChat is an easy to use graphical IRC chat client for the X Window System. |
|---|
| 37 | It allows you to join multiple IRC channels (chat rooms) at the same time, |
|---|
| 38 | talk publicly, private one-on-one conversations etc. Even file transfers |
|---|
| 39 | are possible. |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | %package devel |
|---|
| 43 | Summary: Development files for hexchat |
|---|
| 44 | Summary(ja): hexchat を使った開発に必要なファイル |
|---|
| 45 | Group: Development/Libraries |
|---|
| 46 | Requires: %{name} = %{version}-%{release} |
|---|
| 47 | |
|---|
| 48 | %description devel |
|---|
| 49 | Development files for hexchat. |
|---|
| 50 | |
|---|
| 51 | %description -l ja devel |
|---|
| 52 | hexchat の開発ファイルです。 |
|---|
| 53 | |
|---|
| 54 | %prep |
|---|
| 55 | %setup -q |
|---|
| 56 | |
|---|
| 57 | %patch0 -p0 -b .use-sysconf-to-detect-cpus |
|---|
| 58 | %patch110 -p1 -b .dialog |
|---|
| 59 | %patch200 -p1 -b .servlist |
|---|
| 60 | |
|---|
| 61 | %build |
|---|
| 62 | #./autogen.sh |
|---|
| 63 | |
|---|
| 64 | find -type f -exec chmod a-x {} \; |
|---|
| 65 | find -name configure -exec chmod a+x {} \; |
|---|
| 66 | |
|---|
| 67 | %configure --disable-textfe \ |
|---|
| 68 | --enable-openssl \ |
|---|
| 69 | --enable-python \ |
|---|
| 70 | --enable-shm \ |
|---|
| 71 | --disable-spell \ |
|---|
| 72 | --disable-rpath \ |
|---|
| 73 | --enable-ipv6 |
|---|
| 74 | |
|---|
| 75 | make %{?_smp_mflags} |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | %install |
|---|
| 79 | rm -rf $RPM_BUILD_ROOT |
|---|
| 80 | make DESTDIR=$RPM_BUILD_ROOT install |
|---|
| 81 | |
|---|
| 82 | # Remove unwanted stuff |
|---|
| 83 | find $RPM_BUILD_ROOT -type f -name '*.la' -exec rm -rf {} \; |
|---|
| 84 | |
|---|
| 85 | # Remove unused schema |
|---|
| 86 | rm -f %{buildroot}%{_sysconfdir}/gconf/schemas/apps_hexchat_url_handler.schemas |
|---|
| 87 | |
|---|
| 88 | desktop-file-install \ |
|---|
| 89 | --delete-original \ |
|---|
| 90 | --add-mime-type='x-scheme-handler/irc;x-scheme-handler/ircs' \ |
|---|
| 91 | --set-key=Exec --set-value='sh -c "hexchat --existing --url %U || exec hexchat"' \ |
|---|
| 92 | %{buildroot}/%{_datadir}/applications/hexchat.desktop |
|---|
| 93 | |
|---|
| 94 | %find_lang %{name} |
|---|
| 95 | |
|---|
| 96 | %post |
|---|
| 97 | /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
|---|
| 98 | /usr/bin/update-desktop-database &> /dev/null || : |
|---|
| 99 | |
|---|
| 100 | %postun |
|---|
| 101 | /usr/bin/update-desktop-database &> /dev/null || : |
|---|
| 102 | if [ $1 -eq 0 ] ; then |
|---|
| 103 | /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
|---|
| 104 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
|---|
| 105 | fi |
|---|
| 106 | |
|---|
| 107 | %posttrans |
|---|
| 108 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
|---|
| 109 | |
|---|
| 110 | %clean |
|---|
| 111 | rm -rf $RPM_BUILD_ROOT |
|---|
| 112 | |
|---|
| 113 | %files -f %{name}.lang |
|---|
| 114 | %defattr(-,root,root) |
|---|
| 115 | #%doc share/doc/* |
|---|
| 116 | %{_bindir}/hexchat |
|---|
| 117 | %{_libdir}/hexchat/plugins/*.so |
|---|
| 118 | %{_datadir}/appdata/hexchat.appdata.xml |
|---|
| 119 | %{_datadir}/applications/hexchat.desktop |
|---|
| 120 | %{_datadir}/dbus-1/services/* |
|---|
| 121 | %{_datadir}/icons/hicolor/* |
|---|
| 122 | %{_mandir}/man1/%{name}.1.gz |
|---|
| 123 | |
|---|
| 124 | %files devel |
|---|
| 125 | %defattr(-,root,root) |
|---|
| 126 | %{_includedir}/%{name}-plugin.h |
|---|
| 127 | %{_libdir}/pkgconfig/hexchat-plugin.pc |
|---|
| 128 | |
|---|
| 129 | %changelog |
|---|
| 130 | * Sat Apr 23 2016 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.12.0-1 |
|---|
| 131 | - new upstream release |
|---|
| 132 | |
|---|
| 133 | * Sat Jan 24 2015 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.10.2-1 |
|---|
| 134 | - new upstream release |
|---|
| 135 | |
|---|
| 136 | * Tue Jul 01 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.10.0-1 |
|---|
| 137 | - new upstream release |
|---|
| 138 | |
|---|
| 139 | * Sat Apr 12 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.9.6.1-2 |
|---|
| 140 | - rebuilt with new toolchain |
|---|
| 141 | |
|---|
| 142 | * Sat Oct 12 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.9.6.1-1 |
|---|
| 143 | - new upstream release |
|---|
| 144 | |
|---|
| 145 | * Sat Aug 31 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.9.5-1 |
|---|
| 146 | - new upstream release |
|---|