summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-06-30 01:11:11 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-06-30 01:11:11 +0200
commit7fcc77f52e0bc0797a6c750fe3a8afc1bc5ed1ee (patch)
treeee70d12df306735ac6e6936689ff676290163f8d /packaging
parent01c1ea14f79517ca829268a341da2eb60b7628f9 (diff)
downloadbiboumi-7fcc77f52e0bc0797a6c750fe3a8afc1bc5ed1ee.tar.gz
biboumi-7fcc77f52e0bc0797a6c750fe3a8afc1bc5ed1ee.tar.bz2
biboumi-7fcc77f52e0bc0797a6c750fe3a8afc1bc5ed1ee.tar.xz
biboumi-7fcc77f52e0bc0797a6c750fe3a8afc1bc5ed1ee.zip
Provide a spec file to build a Fedora RPM
Diffstat (limited to 'packaging')
-rw-r--r--packaging/biboumi.spec77
1 files changed, 77 insertions, 0 deletions
diff --git a/packaging/biboumi.spec b/packaging/biboumi.spec
new file mode 100644
index 0000000..5c5491b
--- /dev/null
+++ b/packaging/biboumi.spec
@@ -0,0 +1,77 @@
+Name: biboumi
+Version: 1.0
+Release: 1%{?dist}
+Summary: Lightweight XMPP to IRC gateway
+
+License: zlib
+URL: http://biboumi.louiz.org
+Source0: http://biboumi.louiz.org/biboumi-1.0.tar.xz
+
+BuildRequires: libidn-devel
+BuildRequires: expat-devel
+BuildRequires: libuuid-devel
+BuildRequires: systemd-devel
+BuildRequires: cmake
+BuildRequires: systemd
+BuildRequires: rubygem-ronn
+
+%global biboumi_user %{name}
+%global biboumi_group %{biboumi_user}
+%global biboumi_confdir %{_sysconfdir}/%{name}
+
+
+%description
+An XMPP gateway that connects to IRC servers and translates between the two
+protocols. It can be used to access IRC channels using any XMPP client as if
+these channels were XMPP MUCs.
+
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_BUILD_TYPE=release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPOLLER=EPOLL
+# The documentation is in utf-8, ronn fails to build it if that locale is
+# not specified
+make %{?_smp_mflags}
+LC_ALL=en_GB.utf-8 make doc
+
+
+%install
+make install DESTDIR=%{buildroot}
+
+# Default config file
+install -D -p -m 644 conf/biboumi.cfg \
+ %{buildroot}%{biboumi_confdir}/biboumi.cfg
+
+# Systemd unit file
+install -D -p -m 644 unit/%{name}.service \
+ %{buildroot}%{_unitdir}/%{name}.service
+
+# Create default log directory
+install -p -d %{buildroot}%{biboumi_logdir}
+
+
+%pre
+getent group %{biboumi_group} > /dev/null || groupadd -r %{biboumi_group}
+getent passwd %{biboumi_user} > /dev/null || \
+ useradd -r -g %{biboumi_group} \
+ -s /sbin/nologin -c "Biboumi XMPP to IRC gateway" %{biboumi_user}
+exit 0
+
+
+%files
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%doc README COPYING doc/biboumi.1.md
+%{_unitdir}/%{name}.service
+%dir %{biboumi_logdir}
+%config(noreplace) %{biboumi_confdir}/biboumi.cfg
+
+
+%changelog
+* Wed Jun 25 2014 Le Coz Florent <louiz@louiz.org> - 1.0-1
+- Spec file written from scratch