File ntripcaster.spec of Package ntripcaster

# spec file for package ntripcaster
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2005 Dirk Stoecker <>.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  dos2unix
BuildRequires:  make
BuildRequires:  unzip

Name:           ntripcaster
Requires:       perl
Version:        0.1.5
Release:        0
Summary:        Ntripcaster GNSS data streaming
License:        GPL-2.0+
Group:          Productivity/Networking/Other
Summary(de):    Ntripcaster GNSS Datenserver
Source0:        ntripcaster%{version}.zip
Source1:        rcscript
Source2:        COPYRIGHT
Source3:        ntripcaster
Patch:          fix_for_rpm.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

NTRIP system main server.

%description -l de
Hauptserver des NTRIP systems.

%setup -q -n ntripcaster%{version}
%patch -p1

# clean old stuff, which should not be there
cp %{SOURCE2} .
mv ../README.txt .
dos2unix README.txt
rm -r config.h* acconfig* CVS configure */CVS */ missing mkinstalldirs install-sh aclocal.m4
autoreconf -i
automake -a
./configure logdir=/var/log/ etcdir=/etc/ntripcaster/

rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/sbin
mkdir -p %{buildroot}/etc/%{name}
mkdir -p %{buildroot}/etc/init.d
cp src/ntripcaster %{buildroot}/usr/sbin/
cp conf/ntripcaster.conf.dist %{buildroot}/etc/%{name}/%{name}.conf
cp conf/sourcetable.dat.dist %{buildroot}/etc/%{name}/sourcetable.dat
%if 0%{?suse_version}
cp %{SOURCE1} %{buildroot}/etc/init.d/%{name}
chmod 755 %{buildroot}/etc/init.d/%{name}
ln -s /etc/init.d/%{name} %{buildroot}/usr/sbin/rc%{name}
cp %{SOURCE3} %{buildroot}/etc/init.d/%{name}

rm -rf %{buildroot}

/usr/sbin/useradd -r -d /etc/%{name} -s /bin/bash -c "NtripCaster" -g daemon %{name} 2> /dev/null || :

%stop_on_removal %{name}

%restart_on_update %{name}

%if 0%{?suse_version}
%dir /etc/%{name}
%config(noreplace) /etc/%{name}/%{name}.conf
%config(noreplace) /etc/%{name}/sourcetable.dat
%doc README.txt
%doc conf/NtripSourcetable.doc

openSUSE Build Service is sponsored by