Skip to content

Instantly share code, notes, and snippets.

@postmodern
Last active March 4, 2024 14:42

Revisions

  1. postmodern revised this gist Jan 5, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -41,9 +41,9 @@ tag:
    release: $(PKG) $(SIG) tag

    install:
    for dir in $(INSTALL_DIRS); do install -d $(PREFIX)/$$dir; done
    for file in $(INSTALL_FILES); do install $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
    for dir in $(INSTALL_DIRS); do mkdir -p $(PREFIX)/$$dir; done
    for file in $(INSTALL_FILES); do cp $$file $(PREFIX)/$$file; done
    mkdir -p $(DOC_DIR)
    cp -r $(DOC_FILES) $(DOC_DIR)/

    uninstall:
  2. postmodern revised this gist Nov 26, 2012. 1 changed file with 11 additions and 6 deletions.
    17 changes: 11 additions & 6 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files 2>/dev/null)
    INSTALL_DIRS=$(shell find etc lib bin sbin share -type d 2>/dev/null)
    INSTALL_FILES=$(shell find etc lib bin sbin share -type f 2>/dev/null)
    DOC_FILES=$(shell find *.md *.tt *.txt 2>/dev/null)
    DIRS=etc lib bin sbin share
    INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
    INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null`
    DOC_FILES=*.md *.txt

    PKG_DIR=pkg
    PKG_NAME=$(NAME)-$(VERSION)
    @@ -17,7 +17,7 @@ DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
    pkg:
    mkdir -p $(PKG_DIR)

    $(PKG): pkg $(FILES)
    $(PKG): pkg
    git archive --output=$(PKG) --prefix=$(PKG_NAME)/ HEAD

    build: $(PKG)
    @@ -32,6 +32,8 @@ clean:

    all: $(PKG) $(SIG)

    test:

    tag:
    git tag v$(VERSION)
    git push --tags
    @@ -46,4 +48,7 @@ install:

    uninstall:
    for file in $(INSTALL_FILES); do rm -f $(PREFIX)/$$file; done
    rm -rf $(DOC_DIR)
    rm -rf $(DOC_DIR)


    .PHONY: build sign clean test tag release install uninstall all
  3. postmodern revised this gist Nov 26, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ pkg:
    mkdir -p $(PKG_DIR)

    $(PKG): pkg $(FILES)
    git archive --output=$(PKG) --prefix=$(PKG_NAME)/ master
    git archive --output=$(PKG) --prefix=$(PKG_NAME)/ HEAD

    build: $(PKG)

  4. postmodern revised this gist Nov 26, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ PKG_NAME=$(NAME)-$(VERSION)
    PKG=$(PKG_DIR)/$(PKG_NAME).tar.gz
    SIG=$(PKG_DIR)/$(PKG_NAME).asc

    PREFIX=/usr/local
    PREFIX?=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)

    pkg:
  5. postmodern revised this gist Nov 20, 2012. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@ NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files 2>/dev/null)
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}
    INSTALL_DIRS=$(shell find etc lib bin sbin share -type d 2>/dev/null)
    INSTALL_FILES=$(shell find etc lib bin sbin share -type f 2>/dev/null)
    DOC_FILES=$(shell find *.md *.tt *.txt 2>/dev/null)

    PKG_DIR=pkg
    PKG_NAME=$(NAME)-$(VERSION)
    @@ -39,11 +39,11 @@ tag:
    release: $(PKG) $(SIG) tag

    install:
    for dir in `find $(INSTALL_DIRS) -type d 2>/dev/null`; do install -d $(PREFIX)/$$dir; done
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install $$file $(PREFIX)/$$file; done
    for dir in $(INSTALL_DIRS); do install -d $(PREFIX)/$$dir; done
    for file in $(INSTALL_FILES); do install $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
    cp -r $(DOC_FILES) $(EXTRA_DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true
    cp -r $(DOC_FILES) $(DOC_DIR)/

    uninstall:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do rm -f $(PREFIX)/$$file; done
    for file in $(INSTALL_FILES); do rm -f $(PREFIX)/$$file; done
    rm -rf $(DOC_DIR)
  6. postmodern revised this gist Nov 15, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files)
    FILES=$(shell git ls-files 2>/dev/null)
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}
  7. postmodern revised this gist Oct 24, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,7 @@ tag:
    release: $(PKG) $(SIG) tag

    install:
    for dir in `find $(INSTALL_DIRS) -type d 2>/dev/null`; do install -d $(PREFIX)/$$file; done
    for dir in `find $(INSTALL_DIRS) -type d 2>/dev/null`; do install -d $(PREFIX)/$$dir; done
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
    cp -r $(DOC_FILES) $(EXTRA_DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true
  8. postmodern revised this gist Oct 24, 2012. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -39,10 +39,10 @@ tag:
    release: $(PKG) $(SIG) tag

    install:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install -D $$file $(PREFIX)/$$file; done
    for dir in `find $(INSTALL_DIRS) -type d 2>/dev/null`; do install -d $(PREFIX)/$$file; done
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
    cp -r $(DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true
    cp -r $(EXTRA_DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true
    cp -r $(DOC_FILES) $(EXTRA_DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true

    uninstall:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do rm -f $(PREFIX)/$$file; done
  9. postmodern revised this gist Sep 24, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ EXTRA_DOC_FILES=*.{md,tt,txt}

    PKG_DIR=pkg
    PKG_NAME=$(NAME)-$(VERSION)
    PKG=$(PKG_DIR)/$(PKG_NAME).tar.bz2
    PKG=$(PKG_DIR)/$(PKG_NAME).tar.gz
    SIG=$(PKG_DIR)/$(PKG_NAME).asc

    PREFIX=/usr/local
    @@ -18,7 +18,7 @@ pkg:
    mkdir -p $(PKG_DIR)

    $(PKG): pkg $(FILES)
    tar -cjvf $(PKG) --transform 's|^|$(PKG_NAME)/|' $(FILES)
    git archive --output=$(PKG) --prefix=$(PKG_NAME)/ master

    build: $(PKG)

  10. postmodern revised this gist Aug 14, 2012. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -27,11 +27,17 @@ $(SIG): $(PKG)

    sign: $(SIG)

    all: $(PKG) $(SIG)

    clean:
    rm -f $(PKG) $(SIG)

    all: $(PKG) $(SIG)

    tag:
    git tag v$(VERSION)
    git push --tags

    release: $(PKG) $(SIG) tag

    install:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
  11. postmodern revised this gist Aug 14, 2012. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -14,14 +14,16 @@ SIG=$(PKG_DIR)/$(PKG_NAME).asc
    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)

    $(PKG): $(FILES)
    pkg:
    mkdir -p $(PKG_DIR)

    $(PKG): pkg $(FILES)
    tar -cjvf $(PKG) --transform 's|^|$(PKG_NAME)/|' $(FILES)

    pkg: $(PKG)
    build: $(PKG)

    $(SIG): $(TAR)
    gpg --sign --detach-sign --armor $(TAR)
    $(SIG): $(PKG)
    gpg --sign --detach-sign --armor $(PKG)

    sign: $(SIG)

  12. postmodern revised this gist Aug 6, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ SIG=$(PKG_DIR)/$(PKG_NAME).asc
    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)

    $(PKG): $(PKG_DIR) $(FILES)
    $(PKG): $(FILES)
    mkdir -p $(PKG_DIR)
    tar -cjvf $(PKG) --transform 's|^|$(PKG_NAME)/|' $(FILES)

  13. postmodern revised this gist Aug 6, 2012. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -2,16 +2,17 @@ NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files)
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}

    PKG_DIR=pkg
    PKG_NAME=$(NAME)-$(VERSION)
    PKG=$(PKG_DIR)/$(PKG_NAME).tar.bz2
    SIG=$(PKG_DIR)/$(PKG_NAME).asc

    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}

    $(PKG): $(PKG_DIR) $(FILES)
    mkdir -p $(PKG_DIR)
  14. postmodern revised this gist Aug 6, 2012. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ PKG=$(PKG_DIR)/$(PKG_NAME).tar.bz2
    SIG=$(PKG_DIR)/$(PKG_NAME).asc

    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}
    @@ -32,8 +32,8 @@ clean:
    install:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(DOC_DIR)
    cp -r $(DOC_FILES) $(DOC_DIR) 2>/dev/null || true
    cp -r $(EXTRA_DOC_FILES) $(DOC_DIR) 2>/dev/null || true
    cp -r $(DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true
    cp -r $(EXTRA_DOC_FILES) $(DOC_DIR)/ 2>/dev/null || true

    uninstall:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do rm -f $(PREFIX)/$$file; done
  15. postmodern revised this gist Aug 6, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -31,10 +31,10 @@ clean:

    install:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    install -d $(DOC_DIR)
    cp -r $(DOC_FILES) $(DOC_DIR) 2>/dev/null || true
    cp -r $(EXTRA_DOC_FILES) $(DOC_DIR) 2>/dev/null || true

    uninstall:
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do rm -f $(PREFIX)/$$file; done
    rm -rf $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    rm -rf $(DOC_DIR)
  16. postmodern revised this gist Aug 6, 2012. 1 changed file with 10 additions and 7 deletions.
    17 changes: 10 additions & 7 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -2,26 +2,29 @@ NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files)
    PKG=$(NAME)-$(VERSION).tar.bz2
    SIG=$(PKG).asc
    PKG_DIR=pkg
    PKG_NAME=$(NAME)-$(VERSION)
    PKG=$(PKG_DIR)/$(PKG_NAME).tar.bz2
    SIG=$(PKG_DIR)/$(PKG_NAME).asc

    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}

    $(PKG): $(FILES)
    tar -cjvf $(PKG) $(FILES)
    $(PKG): $(PKG_DIR) $(FILES)
    mkdir -p $(PKG_DIR)
    tar -cjvf $(PKG) --transform 's|^|$(PKG_NAME)/|' $(FILES)

    pkg: $(PKG)

    $(SIG): $(PKG)
    gpg --sign --detach-sign --armor $(PKG)
    $(SIG): $(TAR)
    gpg --sign --detach-sign --armor $(TAR)

    sign: $(SIG)

    all: pkg sign
    all: $(PKG) $(SIG)

    clean:
    rm -f $(PKG) $(SIG)
  17. postmodern revised this gist Aug 6, 2012. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,10 @@ PKG=$(NAME)-$(VERSION).tar.bz2
    SIG=$(PKG).asc

    PREFIX=/usr/local
    DOC_DIR=$(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    INSTALL_DIRS={etc,lib,bin,sbin,share}
    DOC_FILES=doc/*
    EXTRA_DOC_FILES=*.{md,tt,txt}

    $(PKG): $(FILES)
    tar -cjvf $(PKG) $(FILES)
    @@ -23,10 +27,11 @@ clean:
    rm -f $(PKG) $(SIG)

    install:
    for file in `find {etc,lib,bin,sbin,share} -type f`; do install -D $$file $(PREFIX)/$$file; done
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    cp -r doc/* *.{md,tt,txt} $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    cp -r $(DOC_FILES) $(DOC_DIR) 2>/dev/null || true
    cp -r $(EXTRA_DOC_FILES) $(DOC_DIR) 2>/dev/null || true

    uninstall:
    for file in `find {etc,lib,bin,sbin,share} -type f`; do rm -f $(PREFIX)/$$file; done
    for file in `find $(INSTALL_DIRS) -type f 2>/dev/null`; do rm -f $(PREFIX)/$$file; done
    rm -rf $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
  18. postmodern revised this gist Aug 1, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -23,10 +23,10 @@ clean:
    rm -f $(PKG) $(SIG)

    install:
    for file in `find {lib,bin,sbin,share} -type f`; do install -D $$file $(PREFIX)/$$file; done
    for file in `find {etc,lib,bin,sbin,share} -type f`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    cp -r doc/* *.{md,tt,txt} $(PREFIX)/share/doc/$(NAME)-$(VERSION)/

    uninstall:
    for file in `find {lib,bin,sbin,share} -type f`; do rm $(PREFIX)/$$file; done
    for file in `find {etc,lib,bin,sbin,share} -type f`; do rm -f $(PREFIX)/$$file; done
    rm -rf $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
  19. postmodern revised this gist Aug 1, 2012. 1 changed file with 7 additions and 20 deletions.
    27 changes: 7 additions & 20 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -2,23 +2,10 @@ NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files)
    BIN_FILES=$(shell find bin/ -type f)
    SBIN_FILES=$(shell find sbin/ -type f)
    LIB_FILES=$(shell find lib/ -type f)
    MAN_FILES=$(shell find man/ -type f)
    DOC_FILES=$(shell find doc/ -type f)
    DOC_FILES+=$(shell find . -type f -name *.{md,tt,txt})

    PKG=$(NAME)-$(VERSION).tar.bz2
    SIG=$(PKG).asc

    PREFIX=/usr/local
    LIB_DIR=$(PREFIX)/lib
    BIN_DIR=$(PREFIX)/bin
    SBIN_DIR=$(PREFIX)/sbin
    SHARE_DIR=$(PREFIX)/share
    MAN_DIR=$(SHARE_DIR)/man
    DOC_DIR=$(SHARE_DIR)/doc/$(NAME)-$(VERSION)

    $(PKG): $(FILES)
    tar -cjvf $(PKG) $(FILES)
    @@ -36,10 +23,10 @@ clean:
    rm -f $(PKG) $(SIG)

    install:
    cp -r lib/* $(LIB_DIR)/
    cp -r bin/* $(BIN_DIR)/
    cp -r sbin/* $(SBIN_DIR)/
    cp -r man/* $(MAN_DIR)/
    mkdir -p $(DOC_DIR)/
    cp -r doc/* $(DOC_DIR)/
    cp *.{md,tt,txt} $(DOC_DIR)/
    for file in `find {lib,bin,sbin,share} -type f`; do install -D $$file $(PREFIX)/$$file; done
    install -d $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
    cp -r doc/* *.{md,tt,txt} $(PREFIX)/share/doc/$(NAME)-$(VERSION)/

    uninstall:
    for file in `find {lib,bin,sbin,share} -type f`; do rm $(PREFIX)/$$file; done
    rm -rf $(PREFIX)/share/doc/$(NAME)-$(VERSION)/
  20. postmodern revised this gist Aug 1, 2012. 1 changed file with 11 additions and 13 deletions.
    24 changes: 11 additions & 13 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,11 @@ PKG=$(NAME)-$(VERSION).tar.bz2
    SIG=$(PKG).asc

    PREFIX=/usr/local
    LIB_DIR=$(PREFIX)/lib
    BIN_DIR=$(PREFIX)/bin
    SBIN_DIR=$(PREFIX)/sbin
    SHARE_DIR=$(PREFIX)/share
    MAN_DIR=$(SHARE_DIR)/man
    DOC_DIR=$(SHARE_DIR)/doc/$(NAME)-$(VERSION)

    $(PKG): $(FILES)
    @@ -32,16 +36,10 @@ clean:
    rm -f $(PKG) $(SIG)

    install:
    for file in $(BIN_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(SBIN_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(LIB_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(MAN_FILES); do cp $$file $(SHARE_DIR)/$$file; done
    mkdir -p $(DOC_DIR)
    cp $(DOC_FILES) $(DOC_DIR)

    uninstall:
    for file in $(BIN_FILES); do rm $(PREFIX)/$$file; done
    for file in $(SBIN_FILES); do rm $(PREFIX)/$$file; done
    for file in $(LIB_FILES); do rm $(PREFIX)/$$file; done
    for file in $(MAN_FILES); do rm $(SHARE_DIR)/$$file; done
    rm -rf $(DOC_DIR)
    cp -r lib/* $(LIB_DIR)/
    cp -r bin/* $(BIN_DIR)/
    cp -r sbin/* $(SBIN_DIR)/
    cp -r man/* $(MAN_DIR)/
    mkdir -p $(DOC_DIR)/
    cp -r doc/* $(DOC_DIR)/
    cp *.{md,tt,txt} $(DOC_DIR)/
  21. @invalid-email-address Anonymous revised this gist Aug 1, 2012. No changes.
  22. @invalid-email-address Anonymous created this gist Aug 1, 2012.
    47 changes: 47 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    NAME=project
    VERSION=0.0.1

    FILES=$(shell git ls-files)
    BIN_FILES=$(shell find bin/ -type f)
    SBIN_FILES=$(shell find sbin/ -type f)
    LIB_FILES=$(shell find lib/ -type f)
    MAN_FILES=$(shell find man/ -type f)
    DOC_FILES=$(shell find doc/ -type f)
    DOC_FILES+=$(shell find . -type f -name *.{md,tt,txt})

    PKG=$(NAME)-$(VERSION).tar.bz2
    SIG=$(PKG).asc

    PREFIX=/usr/local
    SHARE_DIR=$(PREFIX)/share
    DOC_DIR=$(SHARE_DIR)/doc/$(NAME)-$(VERSION)

    $(PKG): $(FILES)
    tar -cjvf $(PKG) $(FILES)

    pkg: $(PKG)

    $(SIG): $(PKG)
    gpg --sign --detach-sign --armor $(PKG)

    sign: $(SIG)

    all: pkg sign

    clean:
    rm -f $(PKG) $(SIG)

    install:
    for file in $(BIN_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(SBIN_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(LIB_FILES); do cp $$file $(PREFIX)/$$file; done
    for file in $(MAN_FILES); do cp $$file $(SHARE_DIR)/$$file; done
    mkdir -p $(DOC_DIR)
    cp $(DOC_FILES) $(DOC_DIR)

    uninstall:
    for file in $(BIN_FILES); do rm $(PREFIX)/$$file; done
    for file in $(SBIN_FILES); do rm $(PREFIX)/$$file; done
    for file in $(LIB_FILES); do rm $(PREFIX)/$$file; done
    for file in $(MAN_FILES); do rm $(SHARE_DIR)/$$file; done
    rm -rf $(DOC_DIR)