2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
12 AUTOMAKE_OPTIONS = gnu
14 SUBDIRS = doc src man contrib
20 maintainer-clean-local:
22 rm -f Makefile.in Makefile aclocal.m4 configure
23 rm -f mkinstalldirs missing depcomp install-sh
24 rm -f config.log debian
27 make -C src/testsuite check
30 make -C src/ngircd lint
36 @xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
38 || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 )
40 xcode: have-xcodebuild
41 rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \
42 def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \
43 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
44 -configuration Default $$def build
46 xcode-clean: have-xcodebuild
47 xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \
48 -configuration Default clean
49 rm -fr contrib/MacOSX/build
52 rpm -ta ngircd-*.tar.gz
55 [ -f debian/rules ] || ln -s contrib/Debian debian
56 dpkg-buildpackage -rfakeroot -i
58 osxpkg: have-xcodebuild
59 @packagemaker >/dev/null 2>&1; [ $$? -le 1 ] \
60 || ( echo; echo "Error: \"packagemaker\" not found!"; echo; exit 2)
62 ./configure --prefix=/opt/ngircd
64 make -C contrib/MacOSX de.barton.ngircd.plist
65 mkdir -p ngircd.dest/opt/ngircd/sbin
66 DESTDIR="$$PWD/ngircd.dest" make -C doc install
67 DESTDIR="$$PWD/ngircd.dest" make -C contrib install
68 DESTDIR="$$PWD/ngircd.dest" make -C man install
69 cp contrib/MacOSX/build/Default/ngIRCd \
70 ngircd.dest/opt/ngircd/sbin/ngircd
71 rm ngircd.dest/opt/ngircd/etc/ngircd.conf
72 echo "Have a nice day IRCing!" >ngircd.dest/opt/ngircd/etc/ngircd.motd
73 chmod -R a-s,og-w,a+rX ngircd.dest
74 cd contrib/MacOSX && packagemaker \
76 --out ../../$(distdir).mpkg
77 rm -f $(distdir).mpkg.zip
78 zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
79 rm -rf ngircd.dest $(distdir).mpkg