16
16
INSTALL_PROGRAM += -s
20
20
PIKEBIN=/usr/bin/$(PIKE)
22
PIKE_VERSION=$(shell $(PIKEBIN) -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);')
22
PIKE_VERSION=$(shell $(PIKEBIN) -e \
23
'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);')
23
24
export PIKE_INCLUDE_PREFIX=/usr/include/pike/$(PIKE_VERSION)
33
rm -rf patch-stamp debian/patched
35
# Call this, if you got a CVS checkout to prepare the sources for configuration
28
40
cd sources && aclocal && autoconf && . build
30
42
cd spm && aclocal && autoconf
44
build: patch build-stamp
36
# Add here commands to compile the package.
48
# Add here commands to configure the package.
37
49
chmod a+x configure */configure */*/configure
38
./configure --prefix=$(PREFIX) --with-realdir=$(REAL_DIR) --with-pike=/usr/bin/pike7.4 --with-config=/etc/steam --with-installdir=$(CURDIR)/$(INSTALL_DIR)
50
./configure --prefix=$(PREFIX) --with-realdir=$(REAL_DIR) \
51
--with-pike=/usr/bin/$(PIKE) --with-config=/etc/steam \
52
--with-installdir=$(CURDIR)/$(INSTALL_DIR) \
53
--with-steamdir=/usr/share/steam
39
54
cd sources && ./configure
42
# steam will be installed there
56
# steam will be build there
44
#/usr/bin/docbook-to-man debian/steam.sgml > steam.1
48
61
-find -name CVS -type d -exec rm -rf {} \;
49
62
-rm -rf $(INSTALL_DIR) $(INSTALL_LIBDIR) Makefile configure setup version
50
-rm -rf server/libraries/AbstractCallbacks.pike sources/aclocal.m4 sources/autom4te.cache sources/configure sources/libxslt/autom4te.cache sources/libxslt/configure sources/libxslt/Makefile sources/Makefile sources/wiki/autom4te.cache sources/wiki/configure sources/wiki/Makefile sources/_XML/autom4te.cache sources/_XML/configure sources/_XML/Makefile spm/aclocal.m4 spm/autom4te.cache spm/.in spm/spm server/libraries/*.so sources/wiki/wiki.so
63
-rm -rf server/libraries/AbstractCallbacks.pike sources/aclocal.m4 \
64
sources/autom4te.cache sources/configure sources/libxslt/autom4te.cache \
65
sources/libxslt/configure sources/libxslt/Makefile sources/Makefile \
66
sources/wiki/autom4te.cache sources/wiki/configure \
67
sources/wiki/Makefile sources/_XML/autom4te.cache \
68
sources/_XML/configure sources/_XML/Makefile spm/aclocal.m4 \
69
spm/autom4te.cache spm/.in spm/spm server/libraries/*.so \
72
clean: clean-patched unpatch
56
# Add here commands to clean up after the build process.
57
# The original Makefile deletes configure files, which should be
58
# included in debian diffs. So clean manually
60
for a in sources; do ( if test -f $$a/Makefile; then cd $$a && $(MAKE) $(MAKE_FLAGS) clean; fi ); done
77
-for a in sources; do ( if test -f $$a/Makefile; then cd $$a && $(MAKE) $(MAKE_FLAGS) clean; fi ); done
62
-rm -rf server/libraries/AbstractCallbacks.pike sources/aclocal.m4 sources/autom4te.cache sources/libxslt/autom4te.cache sources/wiki/autom4te.cache sources/_XML/autom4te.cache spm/aclocal.m4 spm/autom4te.cache spm/.in server/libraries/*.so sources/wiki/wiki.so sources/libxslt/Makefile sources/Makefile sources/wiki/Makefile sources/_XML/Makefile __tmp.tar
79
-rm -rf server/libraries/AbstractCallbacks.pike sources/aclocal.m4 \
80
sources/autom4te.cache sources/libxslt/autom4te.cache \
81
sources/wiki/autom4te.cache sources/_XML/autom4te.cache \
82
spm/aclocal.m4 spm/autom4te.cache spm/.in server/libraries/*.so \
83
sources/wiki/wiki.so sources/libxslt/Makefile sources/Makefile \
84
sources/wiki/Makefile sources/_XML/Makefile __tmp.tar
64
86
-find -name config.log -type f -exec rm -f {} \;
65
87
-find -name config.status -type f -exec rm -f {} \;
74
# Add here commands to install the package into debian/steam.
97
mkdir -p $(INSTALL_DIR)/usr/share/doc/steam/examples # Sample Configurations
98
mkdir -p $(INSTALL_DIR)/usr/share/lintian/overrides # Lintian overrides
99
mkdir -p $(INSTALL_DIR)/var/lib/steam # chroot
100
mkdir -p $(INSTALL_DIR)/var/log/steam # Logfiles
75
101
mkdir -p $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)
76
102
mkdir -p $(INSTALL_LIBDIR)/$(PREFIX)/$(REAL_LIBDIR)/server/libraries/
104
# Perform the actual installation
78
105
$(MAKE) install DESTDIR=$(CURDIR)/$(INSTALL_DIR)
80
# make a relative symlink
107
# Links should be relative symlinks
81
108
rm $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/steam
82
ln -s -f ../../bin/pike7.4 $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/steam
85
install -m 755 -d $(INSTALL_DIR)/usr/share/lintian/overrides
110
# install lintian overrides
86
111
install -m 644 debian/steam.lintian.overrides $(INSTALL_DIR)/usr/share/lintian/overrides/steam
89
find $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR) -type f -name '*.pike' -o -name '*.h' | xargs chmod 644
114
find $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR) -type f -name '*.pike' -o -name '*.h' -o -name '*.pmod' | xargs chmod 644
90
115
find $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR) -type d | xargs chmod 755
92
cp debian/replacements/start $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)
93
cp debian/replacements/install $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)
94
cp debian/replacements/jail $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/bin
95
chmod u+rwx $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/start
96
chmod u+rwx $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/install
97
chmod u+rwx $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/bin/jail
99
mkdir -p $(INSTALL_DIR)/usr/share/doc/steam/examples
100
cp debian/replacements/steam.cnf $(INSTALL_DIR)/usr/share/doc/steam/examples
101
rm $(INSTALL_DIR)/etc/steam/steam.cnf
117
chmod u+rx $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/start
118
chmod u+rx $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/stop
119
chmod 755 $(INSTALL_DIR)/usr/share/steam/tools/create_cert.pike
120
chmod 755 $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/tools/debug.pike
122
cp config.pike setup $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)
123
cp config/steam.cfg $(INSTALL_DIR)/usr/share/doc/steam/examples
125
# Install modified files
126
cp debian/replacements/configure.h $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/include
102
127
cp debian/replacements/mount.txt $(INSTALL_DIR)/etc/steam
103
# rm $(INSTALL_DIR)/etc/steam/*.tmp
105
chmod 644 config.pike version
106
cp config.pike version setup $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)
107
chmod 755 $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/tools/debug.pike
108
chmod 644 $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/version
129
# The configuration will be created by postinst.
130
rm $(INSTALL_DIR)/etc/steam/steam.cfg
132
# Remove the unneeded version file.
133
rm $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/version
110
135
# move libraries to the seperated steam-lib
111
136
mv $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/xslt.so \
112
137
$(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/xml.so \
113
138
$(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/wiki.so \
114
139
$(INSTALL_LIBDIR)/$(PREFIX)/$(REAL_LIBDIR)/server/libraries/
116
ln -s -f ../../../../lib/steam/server/libraries/xml.so $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/
117
ln -s -f ../../../../lib/steam/server/libraries/xslt.so $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/
118
ln -s -f ../../../../lib/steam/server/libraries/wiki.so $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/server/libraries/
119
ln -s -f ../bin/spm $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/spm/
121
mkdir -p $(INSTALL_DIR)/var/log/steam
141
# Replace Log directory under /usr/share/steam with a link to the
142
# systemwide log directory in /var/log/steam
122
143
rm -rf $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/logs
123
ln -s -f /var/log/steam $(INSTALL_DIR)/$(PREFIX)/$(REAL_DIR)/logs
124
chmod 640 $(INSTALL_DIR)/etc/steam/*
145
# Prepare dbconfig-common files - these are dummy files to make sure the database is being created.
146
mkdir -p $(INSTALL_DIR)/usr/share/dbconfig-common/data/steam/install/
147
echo "status;" >> $(INSTALL_DIR)/usr/share/dbconfig-common/data/steam/install/mysql
126
149
# Build architecture-independent files here.
127
150
binary-indep: build install
130
153
# Build architecture-dependent files here.
131
154
binary-arch: build install
155
# Checks if executed in the right directory
157
# Checks if executed as root oder using fakeroot
159
# Installs Debconf files
134
160
dh_installdebconf
161
# Installs Documentation
138
# dh_installlogrotate
142
dh_installinit -psteam -u "defaults 99"
163
# Installs init.d file, integrates it into runlevel 2 with priority 98
164
# and start the daemon after the installation
165
dh_installinit -u "defaults 98"
166
# Installs Changelogs
148
167
dh_installchangelogs
168
# Creates all Symlinks (libs, directories, etc)
174
# fix typical file permission
176
# Install Debian files into Debian directory used by package management
178
# calculate library dependencies
180
# generate control file with parameters
157
181
dh_gencontrol -- -Vpike:ver=$(PIKE_VERSION) -Vpike:name=$(PIKE)
182
# calculate checksums
184
# really build the debian packages
161
187
binary: binary-indep binary-arch