Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (50 sloc) 1.956 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
CFLAGS := --std=c99 -g -pedantic -Wall -Wextra -Werror ${CFLAGS}
LDFLAGS := -lcurl -lalpm -lyajl -larchive -pthread ${LDFLAGS}
all: ${OUT} doc
${OUT}: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
doc: cower.1
cower.1: README.pod
pod2man --section=1 --center="Cower Manual" --name="COWER" --release="cower ${VERSION}" $< > $@
strip: ${OUT}
strip --strip-all ${OUT}
install: cower cower.1
install -D -m755 cower ${DESTDIR}${PREFIX}/bin/cower
install -D -m644 cower.1 ${DESTDIR}${MANPREFIX}/man1/cower.1
install -D -m644 bash_completion ${DESTDIR}/etc/bash_completion.d/cower
install -D -m644 zsh_completion ${DESTDIR}${PREFIX}/share/zsh/site-functions/_cower
install -D -m644 config ${DESTDIR}${PREFIX}/share/cower/config
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
rm -f ${DESTDIR}${PREFIX}/bin/cower
@echo removing man page from ${DESTDIR}${PREFIX}/man1/cower.1
rm -f ${DESTDIR}/${PREFIX}/man1/cower.1
@echo removing bash completion
rm -f ${DESTDIR}/etc/bash_completion.d/cower
@echo removing zsh completion
rm -f ${DESTDIR}${PREFIX}/share/zsh/site-functions/_cower
@echo removing sample config
rm -f ${DESTDIR}${PREFIX}/share/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: clean dist cower
tar xf cower-${VERSION}.tar.gz
cd cower-${VERSION} && \
rm -rf cower-${VERSION}
${RM} ${OUT} ${OBJ} cower.1
.PHONY: clean dist doc install uninstall
Jump to Line
Something went wrong with that request. Please try again.