File: cyphesis.spec.in

package info (click to toggle)
cyphesis-cpp 0.6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,752 kB
  • sloc: cpp: 94,194; xml: 40,196; python: 8,717; sh: 4,164; makefile: 1,968; ansic: 753
file content (137 lines) | stat: -rw-r--r-- 4,465 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
%define name @PACKAGE@
%define version @VERSION@
%define release 1

Summary: A simple personal server for the WorldForge project
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Group: Amusements/Games
URL: http://www.worldforge.org/dev/eng/servers/cyphesis
Packager: Al Riddoch <alriddoch@googlemail.com>
Vendor: WorldForge
Distribution: Mason
Source0: %{name}-%{version}.tar.bz2
Source1: cyphesis.init
Source2: cyclient.init
Source3: cyphesis.sysconfig
Source4: compile_python.py
PreReq: initscripts /usr/sbin/useradd /sbin/chkconfig /usr/bin/find /bin/rm
Requires: postgresql-server
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: atlascpp-devel mercator-devel >= 0.2.0 varconf-devel >= 0.6.2 skstream-devel >= 0.3.2 readline-devel postgresql-devel >= 7.1 python-devel >= 2.0.0
Obsoletes: cyphesis-service cyphesis-mason

%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
Mason game. Use this package if you intend to run an Mason server.

#%package acorn
#Summary: Game data for running the Acorn game in cyphesis
#Group: Amusements/Games
#Requires: %{name} = %{version}

#%description acorn
#This is the rules data, scripts and map data required for the Acorn
#game. Install this package if you intend to run an Acorn server.
#Acorn is deprecated. See README for details.

#%package werewolf
#Summary: Game data for running the Werewolf game in cyphesis
#Group: Amusements/Games
#Requires: %{name} = %{version} %{name}-acorn

#%description werewolf
#This is the rules data, scripts and map data required for the Werewolf
#game. Install this package if you intend to run an Werewolf server.
#Werewolf is not yet functional.

%prep
%setup -q

%build
CXXFLAGS=$RPM_OPT_FLAGS %configure --disable-dependency-tracking
make -j 3

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
%{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/cyphesis/scripts
%{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/cyphesis/rulesets/basic
%{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/cyphesis/rulesets/mason
find $RPM_BUILD_ROOT/%{_datadir}/cyphesis/scripts -name *.py | xargs /bin/rm
find $RPM_BUILD_ROOT/%{_datadir}/cyphesis/rulesets -name *.py | xargs /bin/rm
if [ -d /etc/rc.d/init.d ]
then
        install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
        install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cyphesis
        install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cyclient
        echo /etc/rc.d/init.d/cyphesis >> service.lst
        echo /etc/rc.d/init.d/cyclient >> service.lst
fi
if [ -d /etc/sysconfig ]
then
        install -d $RPM_BUILD_ROOT/etc/sysconfig
        install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cyphesis
        echo %config\(noreplace\) /etc/sysconfig/cyphesis >> service.lst
fi

%pre
useradd -M -n -r -s /bin/bash -c "Cyphesis user" cyphesis >/dev/null 2>&1 || :

%post
chkconfig --add cyphesis
chkconfig --add cyclient

# If we obsolete cyphesis-service, then it will delete its service entries
# and account after our %pre and %post have run. We need to ensure they
# are re-added.
%triggerpostun -- cyphesis-service
useradd -M -n -r -s /bin/bash -c "Cyphesis user" cyphesis >/dev/null 2>&1 || :
chkconfig --add cyphesis
chkconfig --add cyclient

%preun
if [ $1 = 0 ] ; then
        chkconfig --del cyphesis
        chkconfig --del cyclient
fi

%postun
if [ $1 -ge 1 ]; then
        /sbin/service cyphesis condrestart >/dev/null 2>&1
fi
if [ $1 = 0 ] ; then
        userdel cyphesis >/dev/null 2>&1 || :
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files -f service.lst
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/cyphesis/cyphesis.vconf
%config %{_sysconfdir}/cyphesis/mason.d
%{_bindir}/cy*
%{_datadir}/cyphesis/scripts
%{_datadir}/cyphesis/rulesets/basic
%{_datadir}/cyphesis/rulesets/mason
%{_mandir}/man1/*.1.gz
%doc AUTHORS COPYING NEWS README

#%files acorn
#%defattr(-,root,root)
#%config %{_sysconfdir}/cyphesis/acorn.xml
#%{_datadir}/cyphesis/rulesets/acorn

#%files werewolf
#%defattr(-,root,root)
#%config %{_sysconfdir}/cyphesis/werewolf.xml
#%{_datadir}/cyphesis/rulesets/werewolf