2010-01-24 14:34:03 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I ac/m4
|
|
|
|
AUTOMAKE_OPTION = foreign
|
|
|
|
|
2021-09-08 13:04:04 +00:00
|
|
|
SUBDIRS = etc src sbin pecl-svn
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2021-09-08 13:04:04 +00:00
|
|
|
EXTRA_DIST = README.md mkmf.sh DEBIAN docker
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
PHP_PACKAGE_NAME ?= php
|
|
|
|
|
2010-04-07 14:38:07 +00:00
|
|
|
install-data-hook:
|
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/svnrepo"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/files"
|
2015-12-29 10:19:03 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/issuefiles"
|
2010-04-27 14:56:11 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/attachments"
|
2014-06-24 13:52:05 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/usericons"
|
2010-04-07 14:38:07 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)@LOGDIR@"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)@CACHEDIR@"
|
2022-02-18 14:51:14 +00:00
|
|
|
[ -x /usr/bin/sqlite3 ] && /usr/bin/sqlite3 "$(DESTDIR)@DEPOTDIR@/codepot.db" < "@abs_srcdir@/etc/codepot.sqlite" || /bin/true
|
2010-04-07 14:38:07 +00:00
|
|
|
|
|
|
|
uninstall-hook:
|
2022-02-18 14:51:14 +00:00
|
|
|
rm -f "$(DESTDIR)@DEPOTDIR@/codepot.db"
|
2014-06-24 13:52:05 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/usericons"
|
2010-04-27 14:56:11 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/attachments"
|
2015-12-29 10:19:03 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/issuefiles"
|
2010-04-07 14:38:07 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/files"
|
2010-04-27 14:56:11 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/svnrepo"
|
2010-04-07 14:38:07 +00:00
|
|
|
$(RMDIR) "$(DESTDIR)@DEPOTDIR@"
|
|
|
|
$(RMDIR) "$(DESTDIR)@LOGDIR@"
|
|
|
|
$(RMDIR) "$(DESTDIR)@CACHEDIR@"
|
|
|
|
|
2010-01-24 14:34:03 +00:00
|
|
|
distclean-local:
|
|
|
|
$(RM) -r autom4te.cache config.h.in~ "$(PACKAGE)-$(VERSION)"
|
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
|
2015-04-10 15:14:19 +00:00
|
|
|
# TODO: specify --with-phpextdir and --with-phpextinidir for the deb target
|
2010-01-24 14:34:03 +00:00
|
|
|
deb: dist-gzip
|
|
|
|
tar -zxvf "$(PACKAGE)-$(VERSION).tar.gz"
|
2015-08-31 05:17:55 +00:00
|
|
|
cd "$(PACKAGE)-$(VERSION)"; PHPEXTDIR="`php5 --info 2>/dev/null | grep ^extension_dir | awk '{print $$5;}'`"; ./configure \
|
2010-01-24 14:34:03 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--with-wwwdir=/var/www/codepot \
|
|
|
|
--with-cfgdir=/etc/codepot \
|
|
|
|
--with-depotdir=/var/lib/codepot \
|
|
|
|
--with-logdir=/var/log/codepot \
|
2015-08-31 05:17:55 +00:00
|
|
|
--with-cachedir=/var/cache/codepot \
|
|
|
|
--with-phpextdir="$${PHPEXTDIR}" \
|
|
|
|
--with-phpextinidir=/etc/php5/conf.d
|
2010-01-24 14:34:03 +00:00
|
|
|
rm -rf "/var/tmp/$(PACKAGE)-$(VERSION)"
|
|
|
|
cd "$(PACKAGE)-$(VERSION)"; make install DESTDIR="/var/tmp/$(PACKAGE)-$(VERSION)"
|
2010-03-28 13:44:24 +00:00
|
|
|
cd "$(PACKAGE)-$(VERSION)/DEBIAN"; make install DESTDIR="/var/tmp/$(PACKAGE)-$(VERSION)"
|
|
|
|
# cd "/var/tmp/$(PACKAGE)-$(VERSION)"; find . -type f -a ! -path '*/DEBIAN/*' -exec md5sum {} \; > "/var/tmp/$(PACKAGE)-$(VERSION)/DEBIAN/md5sums"
|
2010-01-24 14:34:03 +00:00
|
|
|
fakeroot dpkg -b "/var/tmp/$(PACKAGE)-$(VERSION)"
|
|
|
|
$(RM) -r "/var/tmp/$(PACKAGE)-$(VERSION)"
|
|
|
|
$(RM) -r "$(PACKAGE)-$(VERSION)"
|
|
|
|
mv -f "/var/tmp/$(PACKAGE)-$(VERSION).deb" .
|
2010-03-28 13:44:24 +00:00
|
|
|
|
2010-04-07 12:13:44 +00:00
|
|
|
rpm: dist
|
|
|
|
rm -rf "@abs_top_builddir@/RPM/BUILD"
|
|
|
|
mkdir -p "@abs_top_builddir@/RPM/BUILD"
|
|
|
|
mkdir -p "@abs_top_builddir@/RPM/SOURCES"
|
|
|
|
mkdir -p "@abs_top_builddir@/RPM/SRPMS"
|
|
|
|
mkdir -p "@abs_top_builddir@/RPM/RPMS"
|
|
|
|
cp codepot-@VERSION@.tar.gz "@abs_top_builddir@/RPM/SOURCES"
|
2015-08-31 05:17:55 +00:00
|
|
|
TARGET_ARCH="`uname -m`"; rpmbuild --define "_topdir @abs_top_builddir@/RPM" --define "php_package_name $(PHP_PACKAGE_NAME)" -ba codepot.spec --target="$${TARGET_ARCH}"
|