~ubuntu-branches/ubuntu/utopic/atool/utopic

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2008-06-24 16:57:28 UTC
  • mfrom: (3.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080624165728-0w49yzajqu84lxg8
Tags: 0.35.0-4
Fix typos in README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.PHONY: debian rpm
 
2
 
 
3
ACLOCAL_AMFLAGS = -I m4
 
4
#SUBDIRS = doc etc
 
5
 
 
6
script_files = atool
 
7
script_stamp_files = $(script_files:%=.%-stamp)
 
8
script_old_files = $(script_files:%=.%-old)
 
9
 
 
10
man_MANS = $(PACKAGE).1
 
11
 
 
12
EXTRA_DIST = $(script_files) extra debian/changelog debian/control debian/copyright debian/rules $(man_MANS)
 
13
DISTCLEANFILES = $(script_stamp_files)
 
14
MAINTAINERCLEANFILES = $(script_old_files)
 
15
 
 
16
dist_bin_SCRIPTS = $(script_files)
 
17
 
 
18
$(script_stamp_files): .%-stamp: % $(srcdir)/configure.ac
 
19
        touch $(notdir $<)
 
20
        sed -r "1~s|[^ ]*|$(PERL_SHEBANG)|;/^\\$$::SYSCONFDIR = /s|'.*'|'$(SYSCONFDIR)'|;/^\\$$::PACKAGE = /s/'.*'/'$(PACKAGE)'/;/^\\$$::VERSION = /s/'.*'/'$(PACKAGE_VERSION)'/;/^\\$$::BUG_EMAIL = /s/'.*'/'$(PACKAGE_BUGREPORT)'/" < $< > $(notdir $<.tmp) \
 
21
          && mv $(notdir $<) .$(notdir $<-old) \
 
22
          && mv $(notdir $<.tmp) $(notdir $<)
 
23
        chmod a+x $(notdir $<)
 
24
        touch $@
 
25
 
 
26
all-local: $(script_stamp_files)
 
27
 
 
28
debian:
 
29
        cd $(srcdir) && dpkg-buildpackage -rfakeroot -us -uc -sd -b
 
30
        
 
31
rpm: $(PACKAGE).spec
 
32
        rpmbuild -ba --clean $<
 
33
 
 
34
install-exec-local:
 
35
        mkdir -p $(DESTDIR)$(bindir)
 
36
        mkdir -p $(DESTDIR)$(mandir)/man1
 
37
        for f in aunpack arepack apack acat als adiff; do \
 
38
          ln -s -f atool $(DESTDIR)$(bindir)/$$f; \
 
39
          ln -s -f atool.1 $(DESTDIR)$(mandir)/man1/$$f.1; \
 
40
        done
 
41
 
 
42
uninstall-local:
 
43
        for f in aunpack arepack apack acat als adiff; do \
 
44
          if [ -L $(DESTDIR)$(bindir)/$$f ]; then \
 
45
            rm $(DESTDIR)$(bindir)/$$f; \
 
46
          fi; \
 
47
          if [ -L $(DESTDIR)$(mandir)/man1/$$f.1 ]; then \
 
48
            rm $(DESTDIR)$(mandir)/man1/$$f.1; \
 
49
          fi; \
 
50
        done