3 # This is a make+ file. Make+ is a set of scripts which enhance GNU
4 # make and let you build RPMs, and other package types with just one
5 # control file. To build this package you will need to download make+
6 # from this site: http://www.annexia.org/freeware/makeplus/
11 VERSION := $(VERSION_MAJOR).$(VERSION_MINOR)
13 SUMMARY := Distributed artificial life
15 AUTHOR := Richard W.M. Jones <rich@annexia.org>
18 Distributed Artificial Life is a package for joining your
19 computer to a network of computers running a large artificial
23 RPM_REQUIRES := perl-libwww-perl, perl >= 5.004, vixie-cron, SysVinit
24 RPM_GROUP := Applications/Internet
26 spooldir = $(localstatedir)/spool/dlife
27 confdir = $(sysconfdir)/dlife
28 crondir = $(sysconfdir)/cron.d
29 rcdir = $(sysconfdir)/init.d
31 CFLAGS += -Wall -Werror -g -O2 \
32 -DCONFDIR=\"$(confdir)\" \
33 -DSPOOLDIR=\"$(spooldir)\"
44 DOCS := $(srcdir)/AUTHORS $(srcdir)/INSTALL $(srcdir)/README \
45 $(srcdir)/archproc.gif $(srcdir)/archproc.fig \
46 $(srcdir)/archref.html $(srcdir)/index.html \
47 $(srcdir)/machineref.html
49 OBJS := cell.o crc.o exec.o image.o load.o main.o random.o soup.o state.o
55 $(MP_CHECK_HEADERS) assert.h dirent.h errno.h fcntl.h grp.h pwd.h \
56 signal.h stddef.h stdint.h string.h sys/param.h sys/types.h \
57 syslog.h time.h unistd.h
58 $(MP_CHECK_FUNCS) closedir getpwnam getuid initgroups nice opendir \
59 openlog readdir setgid setuid syslog
60 ifndef DISABLE_USER_CHECK
61 # $(MP_CHECK_USER_GROUP) dlife dlife
68 $(CC) $(CFLAGS) $^ $(LIBS) -o $@
73 install -d $(DESTDIR)$(bindir)
74 install -d $(DESTDIR)$(docdir)
75 install -d $(DESTDIR)$(spooldir)
76 install -d $(DESTDIR)$(spooldir)/incoming
77 install -d $(DESTDIR)$(spooldir)/outgoing
78 install -d $(DESTDIR)$(spooldir)/saved
79 install -d $(DESTDIR)$(spooldir)/store
80 install -d $(DESTDIR)$(confdir)
81 install -d $(DESTDIR)$(crondir)
82 install -d $(DESTDIR)$(rcdir)
84 install -m 0755 dlife_soup $(srcdir)/dlife_client.pl \
85 $(srcdir)/dlife_server.pl $(DESTDIR)$(bindir)
86 install -m 0644 $(DOCS) $(DESTDIR)$(docdir)
87 install -m 0644 god.dlo $(DESTDIR)$(spooldir)
88 install -m 0644 $(srcdir)/client.conf $(srcdir)/soup.conf \
90 install -m 0644 $(srcdir)/dlife_client.cron $(DESTDIR)$(crondir)
91 install -m 0644 $(srcdir)/dlife.rc $(DESTDIR)$(rcdir)
93 chown -R dlife.dlife $(DESTDIR)$(spooldir) ||:
97 XXX PUT YOUR WEBSITE HERE. IF YOU DON\'T WANT TO MANAGE A WEBSITE WITH
98 XXX MAKE+ THEN JUST DELETE THIS SECTION AND THE upload_website RULE.
103 scp $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)-1.*.rpm \
104 $(PACKAGE)-$(VERSION).bin.tar.gz \
105 you@yourmachine.example.com:/var/www/html/$(PACKAGE)/files
106 scp index.html you@yourmachine.example.com:/var/www/html/$(PACKAGE)/
108 .PHONY: build configure test upload_website