2006-09-14 15:04:48 +00:00
|
|
|
# === variable definitions
|
2017-06-12 09:35:57 +00:00
|
|
|
GET_OS_SH = sh $(MOD_SCRIPT_DIR)/get-os.sh
|
2006-09-14 19:42:09 +00:00
|
|
|
GENERATE_SELECTION = sh $(MOD_SCRIPT_DIR)/generate_selection.sh
|
|
|
|
|
UPLOAD_SH = sh $(MOD_SCRIPT_DIR)/upload.sh
|
2006-09-14 15:04:48 +00:00
|
|
|
|
2006-09-14 15:35:14 +00:00
|
|
|
DISTRIBUTOR = $(shell $(GET_OS_SH) | cut -d- -f1)
|
|
|
|
|
DISTRO_RELEASE = $(shell $(GET_OS_SH) | cut -d- -f2-)
|
2014-03-21 17:54:31 +00:00
|
|
|
UPLOAD_URL = root@ftp.jannet.de:/srv/ftp/pub/packages/linux/$(DISTRIBUTOR)/$(DISTRO_RELEASE)/inst-source/setup/descr
|
2006-09-14 15:35:14 +00:00
|
|
|
|
2006-09-14 20:16:10 +00:00
|
|
|
SELECTION = $(shell $(GENERATE_SELECTION) -s)-packages.txt
|
|
|
|
|
CHANNEL_LIST = $(shell $(GENERATE_SELECTION) -s)-channels.txt
|
2006-09-14 15:04:48 +00:00
|
|
|
|
|
|
|
|
# === targets
|
|
|
|
|
all: selection.done channels.done
|
2006-09-14 15:35:14 +00:00
|
|
|
install:
|
2006-09-14 15:04:48 +00:00
|
|
|
clean:
|
|
|
|
|
rm -rf *.done *.tmp
|
|
|
|
|
distclean: clean
|
2006-08-27 18:51:02 +00:00
|
|
|
upload: upload.done
|
2006-09-14 15:04:48 +00:00
|
|
|
install-smart: rpm-install-smart.done
|
2006-09-14 15:53:46 +00:00
|
|
|
commit: selection.done channels.done
|
2006-09-15 17:48:11 +00:00
|
|
|
cvs add $(SELECTION) $(CHANNEL_LIST) || exit 0
|
2006-09-14 15:53:46 +00:00
|
|
|
cvs commit -m "o updated by target $@"
|
2006-09-14 20:16:10 +00:00
|
|
|
smart-update: smart-update.done
|
2006-09-15 17:48:11 +00:00
|
|
|
smart-config: smart-config.done
|
2006-10-24 09:33:08 +00:00
|
|
|
write: selection.done channels.done
|
2006-08-27 18:51:02 +00:00
|
|
|
|
2008-01-03 12:01:24 +00:00
|
|
|
include $(MODDIR)/make/defs.mk
|
|
|
|
|
|
2006-09-14 15:04:48 +00:00
|
|
|
# === rules
|
2006-09-14 15:35:14 +00:00
|
|
|
selection.done: $(MODDIR)/make/smart-selection.mk
|
2006-09-14 20:16:10 +00:00
|
|
|
rpm -qa --queryformat '%{NAME}\n' | sort -u | \
|
2012-02-04 10:59:02 +00:00
|
|
|
$(SED) '/gpg-pubkey/ d' > $(SELECTION).tmp
|
2008-05-04 22:17:06 +00:00
|
|
|
mv $(SELECTION).tmp $(SELECTION)
|
2006-09-14 14:49:43 +00:00
|
|
|
touch $@
|
2006-08-27 18:51:02 +00:00
|
|
|
|
2006-09-14 15:35:14 +00:00
|
|
|
channels.done: $(MODDIR)/make/smart-selection.mk
|
2012-02-04 10:59:02 +00:00
|
|
|
smart channel --show | $(SED) '/\[rpm-sys\]/,+3 d' > $(CHANNEL_LIST)
|
2006-09-14 15:04:48 +00:00
|
|
|
touch $@
|
2006-08-27 18:51:02 +00:00
|
|
|
|
2006-09-14 14:49:43 +00:00
|
|
|
upload.done: selection.done
|
2006-09-14 15:04:48 +00:00
|
|
|
sh $(UPLOAD_SH) $(SELECTION) $(CHANNEL_LIST) $(UPLOAD_URL)
|
2007-12-19 20:52:10 +00:00
|
|
|
$(CVS_RSH) -l root ftp.jannet.de $(UPDATE_REPO_SH)
|
2006-08-27 18:51:02 +00:00
|
|
|
touch $@
|
|
|
|
|
|
2006-09-14 14:49:43 +00:00
|
|
|
rpm-install-smart.done:
|
|
|
|
|
if ! rpm -q smart >/dev/null 2>&1 ; then \
|
2006-09-14 15:35:14 +00:00
|
|
|
wget ftp.jannet.de:/pub/packages/linux/$(DISTRIBUTOR)/$(DISTRO_RELEASE)/inst-source/rpm/i686/smart.rpm; \
|
2006-09-07 21:14:07 +00:00
|
|
|
sudo rpm -U smart.rpm; \
|
2006-09-14 20:01:56 +00:00
|
|
|
sudo smart update; \
|
|
|
|
|
sudo smart channel --remove-all; \
|
2006-09-07 21:14:07 +00:00
|
|
|
fi
|
|
|
|
|
touch $@
|
|
|
|
|
|
2006-09-14 16:35:39 +00:00
|
|
|
smart-update.done:
|
2006-09-14 20:16:10 +00:00
|
|
|
sudo smart update || exit 0
|
2006-09-14 16:35:39 +00:00
|
|
|
touch $@
|
|
|
|
|
|
2006-09-14 20:01:56 +00:00
|
|
|
%-packages.txt-install: smart-update.done
|
2012-02-04 11:06:22 +00:00
|
|
|
$(CAT) $*-packages.txt | xargs sudo smart install -y
|
2006-09-14 20:01:56 +00:00
|
|
|
|
2006-09-15 17:48:11 +00:00
|
|
|
%-channels.txt-replace:
|
2006-09-14 20:16:10 +00:00
|
|
|
sudo smart channel -y --remove-all
|
|
|
|
|
sudo smart channel -y --add $*-channels.txt
|
|
|
|
|
sudo smart update || exit 0
|
2006-09-14 15:53:46 +00:00
|
|
|
|
2006-09-15 17:48:11 +00:00
|
|
|
smart-config.done:
|
|
|
|
|
sudo smart config --set rpm-check-signatures=false
|
|
|
|
|
sudo smart config --set remove-packages=false
|
|
|
|
|
touch $@
|
|
|
|
|
|