Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (45 sloc) 1.729 kb
# cower - a simple AUR downloader
OUT = cower
VERSION = $(shell git describe)
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
DISTFILES = Makefile README.pod bash_completion zsh_completion config cower.c
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
CPPFLAGS := -DCOWER_VERSION=\"$(VERSION)\" $(CPPFLAGS)
CFLAGS := -std=c99 -g -pedantic -Wall -Wextra -pthread $(CFLAGS)
LDFLAGS := -pthread $(LDFLAGS)
LDLIBS = -lcurl -lalpm -lyajl -larchive -lcrypto
MANPAGES = \
cower.1
all: $(OUT) doc
doc: $(MANPAGES)
cower.1: README.pod
pod2man --section=1 --center="Cower Manual" --name="COWER" --release="cower $(VERSION)" $< $@
strip: $(OUT)
strip --strip-all $(OUT)
install: all
install -D -m755 cower $(DESTDIR)$(PREFIX)/bin/cower
install -D -m644 cower.1 $(DESTDIR)$(MANPREFIX)/man1/cower.1
install -D -m644 bash_completion $(DESTDIR)/usr/share/bash-completion/completions/cower
install -D -m644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_cower
install -D -m644 config $(DESTDIR)$(PREFIX)/share/doc/cower/config
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/cower \
$(DESTDIR)/$(MANPREFIX)/man1/cower.1 \
$(DESTDIR)/etc/bash_completion.d/cower \
$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_cower \
$(DESTDIR)$(PREFIX)/share/doc/cower/config
dist: clean
mkdir cower-$(VERSION)
cp $(DISTFILES) cower-$(VERSION)
sed "s/\(^VERSION *\)= .*/\1= $(VERSION)/" Makefile > cower-$(VERSION)/Makefile
tar czf cower-$(VERSION).tar.gz cower-$(VERSION)
rm -rf cower-$(VERSION)
distcheck: dist
tar xf cower-$(VERSION).tar.gz
$(MAKE) -C cower-$(VERSION)
rm -rf cower-$(VERSION)
clean:
$(RM) $(OUT) $(OBJ) $(MANPAGES)
.PHONY: clean dist doc install uninstall
Jump to Line
Something went wrong with that request. Please try again.