Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 4b2a0f68bdecc6cfc15571b6eaf7ab93 > files > 3

stompserver-1.0.6-2.mga3.src.rpm

Name:    stompserver
Version: 1.0.6
Release: %mkrel 2
Summary: Message queue server based on STOMP
Group:   System/Servers
License: MIT
URL:     https://github.com/gmallard/stompserver_ng
Source0: %{name}_ng-%{version}.zip
Source1: %{name}.service
Source2: %{name}.conf
BuildArch: noarch
BuildRequires: ruby-rake
# for test
BuildRequires: rubygems
BuildRequires: ruby-hoe
BuildRequires: ruby-daemons
BuildRequires: ruby-eventmachine
BuildRequires: ruby-minitest
BuildRequires: ruby-uuid
BuildRequires: ruby-jeweler
Requires: ruby-hoe
Requires: ruby-daemons
Requires: ruby-eventmachine
Requires: rubygems
Requires(post): systemd >= %{systemd_required_version}

%description
Stomp messaging server with file/dbm/memory/activerecord based FIFO queues,
queue monitoring, and basic authentication.

%prep
%setup -q -n %{name}_ng-%{version}
ruby setup.rb config

# add the shebang, needed for initscript
#perl -pi -e '$first or s|(.*)|#!/usr/bin/ruby\n$1|; $first = 1' bin/stompserver

%install
rm -rf %{buildroot}
ruby setup.rb install --prefix=%{buildroot}

install -D -p -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service
install -D -p -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}.conf

install -d %{buildroot}/%{_localstatedir}/lib/%{name}
# to hold a file name .passwd
install -d %{buildroot}/%{_localstatedir}/lib/%{name}/etc/
install -d %{buildroot}/var/log/%{name}

mkdir -p %{buildroot}%{_tmpfilesdir}
cat <<EOF > %{buildroot}%{_tmpfilesdir}/%{name}.conf
d /run/stompserver 0755 stompserver stompserver
EOF

# (cg) Keep the old name for compatibility
ln -s stompserver_ng %{buildroot}%{_bindir}/stompserver

%check
rake test

%files
%doc README.txt
%{_bindir}/stompserver*
%{ruby_sitelibdir}/stomp_server_ng
%{ruby_sitelibdir}/stomp_server_ng.rb
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_tmpfilesdir}/%{name}.conf
%attr(0755,%{name},%{name}) %dir /var/log/%{name}
%attr(0755,%{name},%{name}) %{_localstatedir}/lib/%{name}

%pre
%_pre_useradd %{name} %{_localstatedir}/lib/%{name} /sbin/nologin

%post
%_tmpfilescreate %{name}
%_post_service %{name}

%preun
%_preun_service %{name}

%postun
%_postun_userdel %{name}


%changelog

* Sun Mar 24 2013 colin <colin> 1.0.6-2.mga3
+ Revision: 404859
- Add systemd requires and general post/pre fixes (mga#9302)

* Sun Jan 20 2013 colin <colin> 1.0.6-1.mga3
+ Revision: 390073
- Switch to stompserver_ng for ruby-1.9+ compatibility
- Tweak default config for new version
- Replace sysvinit script with systemd unit
- Require ruby-minitest for build tests.
- Maybe fix build...

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + luigiwalser <luigiwalser>
    - add tmpfiles config for /run/stompserver

* Mon Jul 04 2011 misc <misc> 0.9.9-1.mga2
+ Revision: 118493
- add missing deps, for test
- fix missing deps
- imported package stompserver



* Mon Jul 04 2011 Michael Scherer <misc@mageia.org> 0.9.9-1
- initial rpm for Mageia