~jbboehr/+junk/etcd-package

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: John Boehr
  • Date: 2014-10-22 21:58:22 UTC
  • Revision ID: jbboehr@gmail.com-20141022215822-05ark0yb4yw4s660
Cleanup up the rules file

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Uncomment this to turn on verbose mode.
5
5
#export DH_VERBOSE=1
6
6
 
7
 
export SRCGOPATH=$(CURDIR)
8
 
export GOPATH=$(CURDIR):$(CURDIR)/src/github.com/coreos/etcd/third_party
 
7
export PKGSRCDIR=$(CURDIR)/src/github.com/coreos/etcd
 
8
export GOPATH=$(CURDIR):$(PKGSRCDIR)/third_party
9
9
export GOBIN=$(CURDIR)/bin
10
10
 
11
11
PKGDIR=debian/etcd
15
15
 
16
16
clean:
17
17
        dh_clean
18
 
        rm -rf $(SRCGOPATH)/bin/* $(SRCGOPATH)/pkg/*
19
 
        #cd $(GOPATH)/src && find * -name '*.go' -exec dirname {} \; | xargs -n1 go clean
20
 
        cd src/github.com/coreos/etcd && go clean
21
 
        rm -f $(SRCGOPATH)/goinstall.log
 
18
        rm -rf $(CURDIR)/bin/* $(CURDIR)/pkg/*
 
19
        cd $(PKGSRCDIR) && go clean
 
20
        rm -f $(CURDIR)/goinstall.log
22
21
 
23
22
binary-arch: clean
24
23
        dh_prep
25
24
        dh_installdirs
26
25
        dh_installinit --restart-after-upgrade --error-handler etcd_error_handler
27
 
#       cd $(SRCGOPATH)/src && find * -name '*.go' -exec dirname {} \; | xargs -n1 go install
28
 
        cd src/github.com/coreos/etcd && go install
 
26
        # build and install the package
 
27
        cd $(PKGSRCDIR) && go install
 
28
        # copy the binaries into the package
29
29
        mkdir -p $(PKGDIR)/usr/bin
30
 
        cp $(SRCGOPATH)/bin/* $(PKGDIR)/usr/bin/
 
30
        cp $(CURDIR)/bin/* $(PKGDIR)/usr/bin/
 
31
        # copy our configuration into the package
31
32
        mkdir -p $(PKGDIR)/etc/etcd
32
33
        cp $(CURDIR)/debian/etcd.conf $(PKGDIR)/etc/etcd/
 
34
        # misc dh
33
35
        dh_strip
34
36
        dh_compress
35
37
        dh_fixperms