File obs-wizard.spec of Package obs-wizard

Name:           obs-wizard
Summary:        Build Service spec file wizard
Version:        1
Release:        1
License:        GPL v2 or later
Group:          Productivity/Networking/Web/Utilities
Url:            http://en.opensuse.org/User:Michal-m
Requires:       obs-server
Source1:        bs_wizard
Source2:        wizard_inspect
Source3:        obswizard
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%description
This package contains the backend part of the Build Service spec file
wizard.

After installing the wizard, set WIZARD_HOST = localhost and WIZARD_PORT = 5753
in the frontend configuration (/srv/www/obs/frontend/config/...) and start the
wizard by running
# cd /usr/lib/obs/server
# ./bs_wizard
as root.

%prep
cp %{S:1} %{S:2} %{S:3} .

%build

%install
install -d %buildroot/usr/lib/obs/server
install bs_wizard %buildroot/usr/lib/obs/server
install wizard_inspect %buildroot/usr/lib/obs
install -d %buildroot/srv/obs/wizard/{done,tmp}

install -d %buildroot/etc/init.d
install obswizard %buildroot/etc/init.d
install -d %buildroot/usr/sbin
ln -sf /etc/init.d/obswizard %buildroot/usr/sbin/rcobswizard


%clean
rm -rf %buildroot

%pre
/usr/sbin/groupadd -r obsrun 2> /dev/null || :
/usr/sbin/useradd -r -o -s /bin/false -c "User for build service backend" -d /usr/lib/obs -g obsrun obsrun 2> /dev/null || :

%preun
%stop_on_removal obswizard

%post
%restart_on_update obswizard

%files
%defattr(-,root,root)
/usr/lib/obs
/etc/init.d/obswizard
/usr/sbin/rcobswizard
%attr(-, obsrun, obsrun) /srv/obs

%changelog