summaryrefslogtreecommitdiff
path: root/Makefile
blob: ddd60b827f6d35a2b3356a7f1a8a240139a2dc69 (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
# OpenRC Makefile
# Copyright 2007 Roy Marples 
# Distributed under the terms of the GNU General Public License v2

NAME = openrc
VERSION = 0.1
PKG = $(NAME)-$(VERSION)

SUBDIR = conf.d doc etc init.d man net runlevels sh src

TOPDIR = .
include $(TOPDIR)/default.mk
include $(TOPDIR)/Makefile.$(OS)

install::
	ln -snf /$(RC_LIB)/sh/net.sh $(DESTDIR)/etc/init.d/$(NET_LO) || exit $$?
	ln -snf /$(RC_LIB)/sh/functions.sh $(DESTDIR)/etc/init.d || exit $$?
	$(INSTALL) -d $(DESTDIR)$(RC_LIB)/init.d
	$(INSTALL) -d $(DESTDIR)$(RC_LIB)/tmp

clean::
	rm -f *.bz2

dist:
	$(INSTALL) -d /tmp/$(PKG)
	cp -RPp . /tmp/$(PKG)
	(cd /tmp/$(PKG); git clean; $(MAKE) clean)
	rm -rf /tmp/$(PKG)/*.bz2 /tmp/$(PKG)/.git /tmp/$(PKG)/test
	rm -rf /tmp/$(PKG)/.gitignore /tmp/$(PKG)/src/.gitignore
	sed -i.bak -e '/LDFLAGS += -Wl,-rpath ./ s/^/#/' /tmp/$(PKG)/src/Makefile
	rm -f /tmp/$(PKG)/src/Makefile.bak
	tar cvjpf $(PKG).tar.bz2 -C /tmp $(PKG) 
	rm -rf /tmp/$(PKG) 
	ls -l $(PKG).tar.bz2

# vim: set ts=4 :