File: Makefile

package info (click to toggle)
needrestart 1.2-7~bpo70+1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 524 kB
  • sloc: perl: 1,562; sh: 43; makefile: 25
file content (27 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download | duplicates (3)
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
all:
	cd perl && perl Makefile.PL PREFIX=$(PREFIX) INSTALLDIRS=vendor 
	cd perl && $(MAKE)

install: all
	cd perl && $(MAKE) install
	
	mkdir -p "$(DESTDIR)/etc/needrestart/hook.d"
	cp hooks/* "$(DESTDIR)/etc/needrestart/hook.d/"
	cp ex/needrestart.conf "$(DESTDIR)/etc/needrestart/"
	mkdir -p "$(DESTDIR)/etc/needrestart/conf.d"
	cp ex/conf.d/* "$(DESTDIR)/etc/needrestart/conf.d/"
	
	which apt-get > /dev/null && \
	    mkdir -p "$(DESTDIR)/etc/apt/apt.conf.d" && cp ex/apt/needrestart-apt_d "$(DESTDIR)/etc/apt/apt.conf.d/99needrestart" && \
	    mkdir -p "$(DESTDIR)/etc/dpkg/dpkg.cfg.d" && cp ex/apt/needrestart-dpkg_d "$(DESTDIR)/etc/dpkg/dpkg.cfg.d/needrestart" && \
	    mkdir -p "$(DESTDIR)/usr/lib/needrestart" && cp ex/apt/dpkg-status ex/apt/apt-pinvoke "$(DESTDIR)/usr/lib/needrestart" || true
	
	which debconf > /dev/null && \
	    mkdir -p "$(DESTDIR)/usr/share/needrestart" && \
	    po2debconf ex/debconf/needrestart.templates > "$(DESTDIR)/usr/share/needrestart/needrestart.templates" || true
	
	mkdir -p "$(DESTDIR)/usr/sbin"
	cp needrestart "$(DESTDIR)/usr/sbin/"

clean:
	[ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )