File irssi-ignore-oc.spec of Package irssi-ignore-oc

Name: irssi-ignore-oc
Version: 1.0
Release: 0
%if 0%{?debian_version} != 0 || 0%{?ubuntu_version} != 0
Packager: Irssi packaging team <staff@irssi.org>
BuildRequires: irssi-git-dev
BuildRequires: libglib2.0-dev
BuildRequires: pkg-config
Group: net
%else
BuildRequires: irssi-git-devel
BuildRequires: glib2-devel
BuildRequires: pkgconfig
Group: Productivity/Networking/IRC
%endif
Requires: irssi-git
Source: http://www.elho.net/irc/irssi/ignore_oc/irssi-ignore_oc-1.0.tar.gz
License: GPL-2.0+
Summary: Ignore users without common channels in Irssi

%description
Module for Irssi to ignore private messages by people
not in a common channel with you.

%prep
%setup -n irssi-ignore_oc-%{version}

%build
export IRSSI=%{_includedir}/irssi
%__cc ignore_oc.c -fPIC -Wall -g -o libignore_oc.so \
      -shared \
      -I$IRSSI -I$IRSSI/src -I$IRSSI/src/core -I$IRSSI/src/irc/core \
      -DHAVE_CONFIG_H \
      `pkg-config --cflags glib-2.0` 

%install
%__mkdir_p $RPM_BUILD_ROOT%{_libdir}/irssi/modules
install -m 0755 libignore_oc.so $RPM_BUILD_ROOT%{_libdir}/irssi/modules
%__mkdir_p $RPM_BUILD_ROOT%{_docdir}/irssi
install -m 0644 -T README $RPM_BUILD_ROOT%{_docdir}/irssi/README.ignore_oc

%files
%defattr(-,root,root)
%{_libdir}/irssi/modules/libignore_oc.so*
%doc %{_docdir}/irssi/README.ignore_oc

%changelog