2011-05-04 02:31:45 +02:00
|
|
|
# Makefile for autodist
|
2021-12-19 14:59:19 +01:00
|
|
|
# Copyright (C) 2006-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
2011-05-04 02:31:45 +02:00
|
|
|
#
|
|
|
|
PACKAGE = autodist
|
|
|
|
|
|
|
|
include VERSION
|
|
|
|
|
|
|
|
prefix = /usr
|
|
|
|
exec_prefix = ${prefix}
|
|
|
|
sysconfdir = /etc
|
|
|
|
sbindir = ${exec_prefix}/sbin
|
|
|
|
bindir = ${exec_prefix}/bin
|
|
|
|
datadir = ${prefix}/share
|
2017-12-30 23:14:48 +01:00
|
|
|
unitdir = /lib/systemd/system
|
2012-09-02 13:18:52 +02:00
|
|
|
libexecdir = ${prefix}/libexec
|
2011-05-04 02:31:45 +02:00
|
|
|
mandir = ${prefix}/usr/share/man
|
|
|
|
sysconfigdir= ${sysconfdir}/sysconfig
|
|
|
|
configdir = ${sysconfdir}/autodist
|
|
|
|
localstatedir= /var
|
2014-11-13 14:57:50 +01:00
|
|
|
piddir= /run/autodist
|
2012-05-24 16:29:41 +02:00
|
|
|
cgidir = ${localstatedir}/www/cgi-bin
|
2012-09-21 13:03:27 +02:00
|
|
|
htmldir = ${localstatedir}/www/html
|
2011-05-04 02:31:45 +02:00
|
|
|
|
|
|
|
srcdir = .
|
|
|
|
DESTDIR =
|
|
|
|
|
|
|
|
INSTALL = /usr/bin/install
|
|
|
|
INSTALL_PROGRAM = ${INSTALL} -m 755
|
|
|
|
INSTALL_DATA = ${INSTALL} -m 644
|
|
|
|
INSTALL_DIR = ${INSTALL} -d -m 755
|
|
|
|
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
|
|
|
|
2012-09-10 17:48:21 +02:00
|
|
|
pck_datadir = $(datadir)/$(PACKAGE)
|
|
|
|
pck_statedir = $(localstatedir)/$(PACKAGE)
|
2011-05-04 02:31:45 +02:00
|
|
|
pck_logdir = $(localstatedir)/$(PACKAGE)/log
|
|
|
|
|
|
|
|
distdir = $(PACKAGE)-$(VERSION)
|
|
|
|
dist_archive = $(distdir).tar.bz2
|
|
|
|
|
|
|
|
default:
|
2012-04-26 16:04:52 +02:00
|
|
|
@sed -i "s|^VERSION=.*|VERSION=$(VERSION)|" autodist autoport
|
2011-05-04 02:31:45 +02:00
|
|
|
|
|
|
|
install-dirs:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(configdir)/scripts
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(configdir)/distdb.d
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/cron.hourly
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/cron.daily
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sysconfig
|
2014-05-27 19:11:16 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/logrotate.d
|
2011-05-04 02:31:45 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
2012-05-10 10:30:38 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
2012-05-24 16:47:14 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(cgidir)
|
2012-09-21 13:03:27 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(htmldir)
|
2017-12-30 23:14:48 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(unitdir)
|
2011-05-04 02:31:45 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_datadir)
|
2012-09-10 17:48:21 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/template/autoupdate/spec-patches-build/old
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/template/autoupdate/spec-patches-update/old
|
2011-05-04 02:31:45 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/prepare/{ok,failed}
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/update/{ok,failed}
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/build/{ok,failed}
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/install/{ok,failed}
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/send/{ok,failed}
|
2020-11-25 19:18:24 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/RPM/{SPECS,SRPMS,BUILD,SOURCES,RPMS/{noarch,i586,x86_64,arm,aarch64}}
|
2012-09-02 13:18:52 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(libexecdir)
|
2015-04-18 15:56:38 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/webbuild/{cache,home,notes,tmp,users,uploads}
|
2014-11-13 14:57:50 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(prefix)/lib/tmpfiles.d/
|
2011-05-04 02:31:45 +02:00
|
|
|
|
|
|
|
install-programs:
|
|
|
|
@$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist
|
|
|
|
@$(INSTALL_SCRIPT) autodist-tool $(DESTDIR)$(bindir)/autodist-tool
|
|
|
|
@$(INSTALL_SCRIPT) autoport $(DESTDIR)$(bindir)/autoport
|
2021-12-19 14:59:19 +01:00
|
|
|
@$(INSTALL_SCRIPT) autoport-launcher $(DESTDIR)$(bindir)/autoport-launcher
|
2012-05-10 10:30:38 +02:00
|
|
|
@$(INSTALL_SCRIPT) autoport-chroot $(DESTDIR)$(sbindir)/autoport-chroot
|
2021-12-19 14:59:19 +01:00
|
|
|
@$(INSTALL_SCRIPT) automaint $(DESTDIR)$(sbindir)/automaint
|
2014-05-23 21:17:27 +02:00
|
|
|
@$(INSTALL_SCRIPT) autodist-repository $(DESTDIR)$(sbindir)/autodist-repository
|
2012-12-01 17:18:36 +01:00
|
|
|
@$(INSTALL_SCRIPT) autodist-upstream-updates $(DESTDIR)$(sbindir)/autodist-upstream-updates
|
2011-05-04 02:31:45 +02:00
|
|
|
@$(INSTALL_SCRIPT) autoport-fix-environment $(DESTDIR)$(bindir)/autoport-fix-environment
|
|
|
|
@$(INSTALL_SCRIPT) etc/autodist/scripts/* $(DESTDIR)$(configdir)/scripts/
|
2012-05-24 16:29:41 +02:00
|
|
|
@$(INSTALL_SCRIPT) autodist-cgi $(DESTDIR)$(cgidir)/autodist
|
2012-09-02 13:18:52 +02:00
|
|
|
@$(INSTALL_SCRIPT) webbuild/webbuild-cgi $(DESTDIR)$(cgidir)/webbuild
|
|
|
|
@$(INSTALL_SCRIPT) webbuild/webbuild-sudo $(DESTDIR)$(libexecdir)/webbuild-sudo
|
|
|
|
@$(INSTALL_SCRIPT) webbuild/webbuild-checkpassword $(DESTDIR)$(libexecdir)/webbuild-checkpassword
|
2012-09-10 17:48:21 +02:00
|
|
|
@$(INSTALL_SCRIPT) webbuild/webbuild-functions $(DESTDIR)$(pck_datadir)/webbuild-functions
|
2012-11-19 23:52:30 +01:00
|
|
|
@$(INSTALL_SCRIPT) webbuild/webbuild-functions-private $(DESTDIR)$(pck_datadir)/webbuild-functions-private
|
2017-12-30 23:14:48 +01:00
|
|
|
@$(INSTALL_SCRIPT) telegram/openmamba_bot.py $(DESTDIR)$(pck_datadir)/openmamba_bot.py
|
2021-03-14 11:55:11 +01:00
|
|
|
@$(INSTALL_SCRIPT) repology-openmamba.py $(DESTDIR)$(pck_datadir)/repology-openmamba.py
|
2012-09-21 13:03:27 +02:00
|
|
|
@cp -a webbuild/html/* $(DESTDIR)$(htmldir)
|
2011-05-04 02:31:45 +02:00
|
|
|
|
|
|
|
install-data:
|
|
|
|
@$(INSTALL_DATA) etc/autodist/config $(DESTDIR)$(configdir)/config
|
|
|
|
@$(INSTALL_DATA) etc/autodist/blacklist $(DESTDIR)$(configdir)/blacklist
|
|
|
|
@$(INSTALL_DATA) etc/autodist/distdb.d/* $(DESTDIR)$(configdir)/distdb.d/
|
|
|
|
@$(INSTALL_DATA) etc/sudoers.d/autoport $(DESTDIR)$(sysconfdir)/sudoers.d/autoport
|
2012-09-02 13:18:52 +02:00
|
|
|
@$(INSTALL_DATA) webbuild/webbuild-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/webbuild
|
2013-05-21 16:12:02 +02:00
|
|
|
@$(INSTALL_DATA) webbuild/webbuild-admin $(DESTDIR)$(localstatedir)/webbuild/users/admin.conf
|
2011-05-04 02:31:45 +02:00
|
|
|
@$(INSTALL_SCRIPT) etc/sysconfig/autoport $(DESTDIR)$(sysconfdir)/sysconfig/autoport
|
2013-02-02 14:20:22 +01:00
|
|
|
@$(INSTALL_SCRIPT) etc/cron.hourly/60-autodist-update $(DESTDIR)$(sysconfdir)/cron.hourly/
|
2021-12-19 14:59:19 +01:00
|
|
|
@$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/
|
2012-08-16 12:10:13 +02:00
|
|
|
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/
|
2012-12-01 17:18:36 +01:00
|
|
|
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-upstream-updates $(DESTDIR)$(sysconfdir)/cron.daily/
|
2014-05-27 19:11:16 +02:00
|
|
|
@$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild
|
2012-09-10 17:48:21 +02:00
|
|
|
@$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec
|
2014-05-28 14:07:37 +02:00
|
|
|
@$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc
|
|
|
|
@$(INSTALL_DATA) autodist-bash_profile $(DESTDIR)$(pck_statedir)/.bash_profile
|
2014-11-13 14:57:50 +01:00
|
|
|
@$(INSTALL_DATA) autodist-tmpfilesd $(DESTDIR)$(prefix)/lib/tmpfiles.d/autodist.conf
|
2017-12-30 23:14:48 +01:00
|
|
|
@$(INSTALL_DATA) telegram/openmambabot.service $(DESTDIR)$(unitdir)/openmambabot.service
|
2012-09-10 17:48:21 +02:00
|
|
|
@touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.success
|
|
|
|
@touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.skip
|
2011-05-04 02:31:45 +02:00
|
|
|
|
|
|
|
install: \
|
|
|
|
install-dirs \
|
|
|
|
install-programs \
|
|
|
|
install-data
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(dist_archive)
|
|
|
|
|
2012-04-26 16:04:52 +02:00
|
|
|
dist: clean default
|
2012-04-26 15:52:09 +02:00
|
|
|
@git log > ChangeLog.git
|
|
|
|
@mkdir /tmp/$(distdir)
|
|
|
|
@cp -a * /tmp/$(distdir)/
|
2011-05-04 02:31:45 +02:00
|
|
|
@rm -f $(dist_archive);\
|
2012-04-26 15:52:09 +02:00
|
|
|
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
|
|
|
@rm -rf /tmp/$(distdir)
|
2011-05-04 02:31:45 +02:00
|
|
|
@echo "file \`$(dist_archive)' created"
|
|
|
|
|
|
|
|
dist-rpm: dist
|
|
|
|
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
|
|
|
|
mv -f $(dist_archive) $$rpm_sourcedir;\
|
|
|
|
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
|