Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. APP=fin
  2. VERSION=1.51
  3. RELEASE=1
  4. ARCH_TYPE=$(shell uname -m)
  5. PREFIX?=/usr/local
  6. ARCH_BUILD_DIR=${HOME}/abs/${APP}
  7. CURR_DIR=$(shell pwd)
  8. all:
  9. rm -f src/flycheck*
  10. gcc -Wall -std=gnu99 -pedantic -O3 -o ${APP} src/*.c -Isrc -lsqlite3
  11. debug:
  12. rm -f src/flycheck*
  13. gcc -Wall -std=gnu99 -pedantic -g -o ${APP} src/*.c -Isrc -lsqlite3
  14. source:
  15. tar cvf ../${APP}_${VERSION}.orig.tar ../${APP}-${VERSION} --exclude-vcs
  16. gzip -f9n ../${APP}_${VERSION}.orig.tar
  17. arch:
  18. rm -f ${APP} *.xz *.sig
  19. @if [ ! -d ${ARCH_BUILD_DIR} ]; then\
  20. mkdir -p ${ARCH_BUILD_DIR};\
  21. fi
  22. rm -rf ${ARCH_BUILD_DIR}/*
  23. tar cvf ${ARCH_BUILD_DIR}/${APP}-${VERSION}.tar --exclude .git .
  24. gzip -f9n ${ARCH_BUILD_DIR}/${APP}-${VERSION}.tar
  25. cp PKGBUILD ${ARCH_BUILD_DIR}
  26. gpg -ba ${ARCH_BUILD_DIR}/${APP}-${VERSION}.tar.gz
  27. sed -i "s|arch=()|arch=('${ARCH_TYPE}')|g" ${ARCH_BUILD_DIR}/PKGBUILD
  28. cd ${ARCH_BUILD_DIR}; updpkgsums; makepkg -f -c -s; makepkg --printsrcinfo > .SRCINFO
  29. unxz ${ARCH_BUILD_DIR}/${APP}-${VERSION}-${RELEASE}-${ARCH_TYPE}.pkg.tar.xz
  30. tar vf ${ARCH_BUILD_DIR}/${APP}-${VERSION}-${RELEASE}-${ARCH_TYPE}.pkg.tar --delete .BUILDINFO
  31. xz ${ARCH_BUILD_DIR}/${APP}-${VERSION}-${RELEASE}-${ARCH_TYPE}.pkg.tar
  32. gpg -ba ${ARCH_BUILD_DIR}/${APP}-${VERSION}-${RELEASE}-${ARCH_TYPE}.pkg.tar.xz
  33. install:
  34. mkdir -p ${DESTDIR}/usr
  35. mkdir -p ${DESTDIR}${PREFIX}
  36. mkdir -p ${DESTDIR}${PREFIX}/bin
  37. install -m 755 -s ${APP} ${DESTDIR}${PREFIX}/bin
  38. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share
  39. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man
  40. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
  41. install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  42. uninstall:
  43. rm -f ${PREFIX}/share/man/man1/${APP}.1.gz
  44. rm -rf ${PREFIX}/share/${APP}
  45. rm -f ${PREFIX}/bin/${APP}
  46. clean:
  47. rm -f ${APP} *.xz *.sig \#* \.#* gnuplot* *.png src/*.plist src/flycheck*