File: Makefile

package info (click to toggle)
apt-mirror 0.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 160 kB
  • sloc: perl: 810; sh: 39; makefile: 30
file content (31 lines) | stat: -rw-r--r-- 938 bytes parent folder | download
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
VERSION := 0.5.4
DIST := apt-mirror CHANGELOG LICENSE Makefile mirror.list postmirror.sh README.md .perltidyrc
BASE_PATH := /var/spool/apt-mirror
PREFIX ?= /usr/local

all:

dist: apt-mirror-$(VERSION).tar.xz

install:
	install -m 755 -D apt-mirror $(DESTDIR)$(PREFIX)/bin/apt-mirror
	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1/
	pod2man apt-mirror > $(DESTDIR)$(PREFIX)/share/man/man1/apt-mirror.1
	if test ! -f $(DESTDIR)/etc/apt/mirror.list; then install -m 644 -D mirror.list $(DESTDIR)/etc/apt/mirror.list; fi
	mkdir -p $(DESTDIR)$(BASE_PATH)/mirror
	mkdir -p $(DESTDIR)$(BASE_PATH)/skel
	mkdir -p $(DESTDIR)$(BASE_PATH)/var

%.tar.bz2: $(DIST)
	tar -c --exclude-vcs --transform="s@^@$*/@" $^ | bzip2 -cz9 > $@

%.tar.gz: $(DIST)
	tar -c --exclude-vcs --transform="s@^@$*/@" $^ | gzip -cn9 > $@

%.tar.xz: $(DIST)
	tar -c --exclude-vcs --transform="s@^@$*/@" $^ | xz -cz9 > $@

clean:
	rm -f *.tar.*

.PHONY: all clean dist install