summaryrefslogtreecommitdiff
blob: 2ce0b10c24d6caa9d0987c0345df78a85c12bc1e (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
# gentoo-functions Makefile
# Copyright 2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

VERSION = 0.9
GITREF ?= $(VERSION)
PKG ?= gentoo-functions-$(VERSION)

ROOTPREFIX ?=
ROOTSBINDIR ?= $(ROOTPREFIX)/sbin
ROOTLIBEXECDIR ?= $(ROOTPREFIX)/lib/gentoo

PREFIX ?= /usr
MANDIR ?= $(PREFIX)/share/man

PROGRAMS = consoletype

all: $(PROGRAMS)

install: all
	install -m 0755 -d $(DESTDIR)$(ROOTSBINDIR)
	install -m 0755 consoletype $(DESTDIR)$(ROOTSBINDIR)
	install -m 0755 -d $(DESTDIR)$(ROOTLIBEXECDIR)
	install -m 0644 functions.sh $(DESTDIR)$(ROOTLIBEXECDIR)
	install -m 0755 -d $(DESTDIR)$(MANDIR)/man1
	install -m 0644 consoletype.1 $(DESTDIR)$(MANDIR)/man1

clean:
	rm -rf $(PROGRAMS)

dist:
	git archive --prefix=$(PKG)/ $(GITREF) | bzip2 > $(PKG).tar.bz2

consoletype: consoletype.c

# vim: set ts=4 :