LogoKolab Groupware OBS > Projects
Log In

View File debian.rules of Package kolab-freebusy (Project Kolab:16)

#!/usr/bin/make -f

export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_configure:
	if [ -f "/etc/plesk-release" ]; then \
		sed -i -e 's/www-data adm/roundcube_sysuser roundcube_sysgroup/g' debian/kolab-freebusy.logrotate ; \
	fi

override_dh_install:
	if [ -f composer.json-dist ]; then \
		rm -rf composer.json ; \
		mv composer.json-dist composer.json ; \
	fi
	mkdir -p $(CURDIR)/debian/home/.composer/
	echo '{}' > $(CURDIR)/debian/home/.composer/composer.json
	patch -p1 < debian/patches/add-composer-autoloader.diff || :
	HOME=$(CURDIR)/debian/home/ composer -vvv dumpautoload --optimize
	sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_psr4.php
	sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_namespaces.php
	sed -i -e "s|.baseDir . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_classmap.php
	sed -i -e "s|__DIR__ . '/../..' . '/../../../share|'/usr/share|" $(CURDIR)/vendor/composer/autoload_static.php || true

	dh_install --list-missing -XLICENSE

	# install sample config
	install -m 644 $(CURDIR)/config/config.ini.sample $(CURDIR)/debian/kolab-freebusy/etc/kolab-freebusy/config.ini

	# Install apache2 configuration
	if [ ! -f "/etc/plesk-release" ]; then \
		mkdir -p $(CURDIR)/debian/kolab-freebusy/etc/apache2/sites-available ; \
		install -pm 644 $(CURDIR)/debian/apache2.conf $(CURDIR)/debian/kolab-freebusy/etc/apache2/sites-available/kolab-freebusy.conf ; \
	fi

override_dh_link:
	# These become links
	rm -rf $(CURDIR)/debian/kolab-freebusy/usr/share/kolab-freebusy/lib/Roundcube
	rm -rf $(CURDIR)/debian/kolab-freebusy/usr/share/kolab-freebusy/lib/plugins
	dh_link