Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
games:WorldForge
cyphesis
cyphesis.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cyphesis.spec of Package cyphesis
Summary: A simple personal server for the WorldForge project Name: cyphesis Version: 0.7.0 Release: 1 License: GPL-2.0+ URL: https://www.worldforge.org/index.php/components/cyphesis Source0: cyphesis-%{version}.tar.xz PreReq: /usr/sbin/useradd /sbin/chkconfig #Set the python interpreter to version 3, for pre-compiling bytecode etc. %global __python %{__python3} BuildRequires: zlib-devel %if 0%{?fedora_version} || 0%{?centos_version} BuildRequires: boost-system boost-filesystem boost-devel BuildRequires: bullet-devel BuildRequires: avahi-devel BuildRequires: sqlite-devel BuildRequires: bzip2-devel %else BuildRequires: sqlite3-devel BuildRequires: libbullet-devel BuildRequires: libavahi-devel BuildRequires: libbz2-devel %if 0%{?leap_version} == 420300 BuildRequires: gcc7-c++ BuildRequires: libboost_system1_61_0 libboost_filesystem1_61_0 boost_1_61-devel %else BuildRequires: gcc-c++ BuildRequires: libboost_system-devel libboost_filesystem-devel %endif %endif BuildRequires: libatlascpp-0_7-0-devel libwfmath-1_0-1-devel libmercator-0_4-0-devel libvarconf-1_0-9-devel BuildRequires: readline-devel postgresql-devel >= 7.1 libgcrypt-devel BuildRequires: pkgconfig cmake doxygen BuildRequires: libxdg-basedir-devel %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} BuildRequires: glibc-all-langpacks %endif %if 0%{?centos_version} BuildRequires: rh-python36-python-devel %else BuildRequires: python3-devel %endif %if 0%{?suse_version} && 0%{?suse_version} < 1500 Requires(post): %insserv_prereq %endif Requires: worldforge-worlds %description Cyphesis is a very simple world simulator. NPCs that do things according to rules. They have minds with simple input and output. They can use/move/make things and have simple discussion. They can deduce simple things (like where I can get these things and where I should be). They have simple memory and use it too. They can have goals (like build home for me or go to dinner). This package includes the rules data, scripts and map data required for the Deeds game. Use this package if you intend to run an Deeds server. %if 0%{?suse_version} %debug_package %endif %prep %setup -q -n %{name}-%{version} %build %if 0%{?leap_version} == 420300 export CC=gcc-7 export CXX=/usr/bin/g++-7 %endif %if 0%{?centos_version} source /opt/rh/rh-python36/enable export PYTON_LIBRARIES=/opt/rh/rh-python36/root/usr/lib64 export PYTHON_INCLUDE_DIRS=/opt/rh/rh-python36/root/usr/include/python3.6m %endif %if 0%{?suse_version} > 1500 cmake -DCMAKE_CXX_FLAGS="%{optflags}" -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBT_USE_DOUBLE_PRECISION=TRUE . %else cmake -DCMAKE_CXX_FLAGS="%{optflags}" -DCMAKE_INSTALL_PREFIX=%{_prefix} . %endif %{__make} %{?_smp_mflags} %check %{__make} CTEST_OUTPUT_ON_FAILURE=1 %{?_smp_mflags} check %install %{__make} DESTDIR=%{buildroot} install %if 0%{?suse_version} #openSUSE puts docs in /usr/share/doc/packages, so we need to move it mkdir -p %{buildroot}%{_docdir}/%{name} mv %{buildroot}/%{_prefix}/share/doc/%{name} %{buildroot}%{_docdir}/%{name} %endif %if 0%{?suse_version} < 1500 if [ -d /etc/init.d ] then install -d $RPM_BUILD_ROOT/etc/init.d install -m 755 tools/%{name}.init $RPM_BUILD_ROOT/etc/init.d/%{name} fi %else install -d %{buildroot}/usr/lib/systemd/system install tools/systemd/%{name}.service $RPM_BUILD_ROOT/usr/lib/systemd/system/%{name}.service %endif # Use a /etc/sysconfig/cyphesis variable to determine if # we should load the world data into the cyphesis server # via cyclient or not. This should allow us to use a single # init.d script for both starting cyphesis and populating the world. echo "POPULATE_WORLD=1" >> tools/%{name}.sysconfig %if 0%{?suse_version} %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif install -D -m 644 tools/%{name}.sysconfig %{buildroot}%{_fillupdir}/sysconfig.%{name} %endif %if 0%{?fedora_version} install -d %{buildroot}%{_sysconfdir}/init.d install -m 755 tools/%{name}.init %{buildroot}%{_sysconfdir}/init.d/%{name} install -d %{buildroot}%{_sysconfdir}/sysconfig install -m 644 tools/%{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name} # Install logwatch files #%% install -pD -m 0644 %%{SOURCE4} %%{buildroot}%%{logwatch_conf}/logfiles/%%{name}.conf #%%install -pD -m 0755 %%{SOURCE5} %%{buildroot}%%{logwatch_scripts}/services/%%{name} #%%install -pD -m 0644 %%{SOURCE6} %%{buildroot}%%{logwatch_conf}/services/%%{name}.conf #%%install -pD -m 0755 %%{SOURCE7} %%{buildroot}%%{logwatch_scripts}/shared/applycyphesisdate #%%mkdir -p $RPM_BUILD_ROOT%%{_tmpfilesdir} #%%install -m 644 %%{SOURCE8} $RPM_BUILD_ROOT%%{_tmpfilesdir}/%%{name}.conf # Install ChangeLog to documentation directory so we don't have to mix the use of the doc macro and pkgdocdir # https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Documentation install -p -m 0644 ChangeLog %{buildroot}%{_pkgdocdir} %endif mkdir -p %{buildroot}%{_var}/log/%{name} mkdir -p %{buildroot}%{_var}/lib/%{name} %pre %if 0%{?suse_version} >= 1500 %service_add_pre %{name}.service %endif getent group cyphesis >/dev/null || groupadd -r cyphesis getent passwd cyphesis >/dev/null || \ useradd -r -g cyphesis -d %{_datadir}/%{name} \ -c "Cyphesis game server" cyphesis cyphesis_shell=`getent passwd cyphesis | cut -d: -f 7` if [ "$cyphesis_shell" == "/sbin/nologin" ] ; then chsh cyphesis -s /bin/bash fi exit 0 %if 0%{?suse_version} %if 0%{?suse_version} < 1500 %post %fillup_and_insserv %{name} %preun %stop_on_removal %{name} %postun %restart_on_update %{name} %insserv_cleanup %else %post %service_add_post %{name}.service %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %endif %else %post /sbin/chkconfig --add cyphesis /bin/systemd-tmpfiles --create %_sysconfdir/tmpfiles.d/cyphesis.conf %preun if [ "$1" = "0" ]; then /sbin/service cyphesis stop > /dev/null 2>&1 /sbin/chkconfig --del cyphesis fi %postun if [ "$1" -ge "1" ]; then /sbin/service cyphesis condrestart >/dev/null 2>&1 fi %endif %files %license COPYING %{_bindir}/cy* %{_datadir}/%{name} %{_mandir}/man1/*.1.gz %if 0%{?fedora_version} %{_pkgdocdir}/* %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %else %{_docdir}/%{name} %endif %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/* %if 0%{?suse_version} < 1500 %{_sysconfdir}/init.d/%{name} %else /usr/lib/systemd/system/cyphesis.service %endif # Package up the log and sock directory with special permissions so that the # service can write to it. %dir %attr(0755,cyphesis,cyphesis) %{_var}/log/%{name} %dir %attr(0755,cyphesis,cyphesis) %{_var}/lib/%{name} #%%ghost %%dir %%attr(0755,cyphesis,cyphesis) %%{_var}/run/%%{name} #%%attr(644,root,root) %%{_tmpfilesdir}/cyphesis.conf %if 0%{?suse_version} %{_fillupdir}/sysconfig.%{name} %endif %changelog * Wed Mar 8 2017 Erik Ogenvik <erik@ogenvik.org> 0.7.0 Initial version.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor