summaryrefslogtreecommitdiff
blob: 62f4ea7b4bd34402696eb1243fc425ecc9fc3e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# NOTE: this Makefile is mainly for developer use, as there isn't really
# anything to build.

distapp = gentoo-bashcomp
distver := $(shell date -u +%Y%m%d)
distpkg := $(distapp)-$(distver)

PREFIX = /usr

all:
	@echo Nothing to compile.

install:
	install -d "$(DESTDIR)$(PREFIX)/share/bash-completion"
	install -m0644 gentoo "$(DESTDIR)$(PREFIX)/share/bash-completion"
	install -d "$(DESTDIR)/etc/bash_completion.d"
	ln -snf "../..$(PREFIX)/share/bash-completion/gentoo" \
		"$(DESTDIR)/etc/bash_completion.d/gentoo"

tag:
	git pull
	git tag $(distpkg)
	@echo
	@echo "tag created remember to push it"
	@echo

dist: tag
	git archive --prefix=$(distpkg)/ --format=tar -o $(distpkg).tar $(distpkg)
	mkdir $(distpkg)/
	git log > $(distpkg)/ChangeLog
	tar vfr $(distpkg).tar $(distpkg)/ChangeLog
	bzip2 $(distpkg).tar
	rm -rf $(distpkg)/
	@echo "success."

dist-upload: dist
	scp $(distpkg).tar.bz2 dev.gentoo.org:/space/distfiles-local/
	ssh dev.gentoo.org chmod ug+rw /space/distfiles-local/$(distpkg).tar.bz2