File: rules

package info (click to toggle)
rccp 0.9-2.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 252 kB
  • ctags: 44
  • sloc: ansic: 830; sh: 260; perl: 134; makefile: 30
file content (26 lines) | stat: -rwxr-xr-x 905 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# rules --- Debian packaging rules for rccp

# Let's use CDBS!

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/class/makefile.mk

DEB_MAKE_CLEAN_TARGET := clean
DEB_MAKE_BUILD_TARGET := cccp
DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(DEB_DESTDIR) PREFIX=/usr \
				MANDIR=/usr/share/man/man1

# Transform mentions of `cccp' to `rccp'
SEDPIPE = sed -e 's/cccp/rccp/' | sed -e 's/CCCP/RCCP/'
binary-post-install/rccp::
	mv $(DEB_DESTDIR)/usr/bin/cccp $(DEB_DESTDIR)/usr/bin/rccp
	mv $(DEB_DESTDIR)/usr/share/man/man1/cccp.1 \
		$(DEB_DESTDIR)/usr/share/man/man1/rccp.1
	for file in $$(cd $(CURDIR)/scripts; ls); do \
	  cat $(CURDIR)/scripts/$$file | $(SEDPIPE) \
	  	> $(DEB_DESTDIR)/usr/lib/rccp/$$file ; \
	  chmod 755 $(DEB_DESTDIR)/usr/lib/rccp/$$file ; \
	done
	-rm -f $(DEB_DESTDIR)/usr/lib/rccp/SCRIPTS