xssstate-1.0.20130103-gentoo.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -5,7 +5,7 @@
  4. SRC = xssstate.c
  5. OBJ = ${SRC:.c=.o}
  6. -all: options xssstate
  7. +all: xssstate
  8. options:
  9. @echo xssstate build options:
  10. @@ -14,42 +14,34 @@
  11. @echo "CC = ${CC}"
  12. .c.o:
  13. - @echo CC $<
  14. - @${CC} -c ${CFLAGS} $<
  15. + ${CC} -c ${CFLAGS} $<
  16. ${OBJ}: config.mk
  17. -xssstate: xssstate.o
  18. - @echo CC -o $@
  19. - @${CC} -o $@ xssstate.o ${LDFLAGS}
  20. +xssstate: options xssstate.o
  21. + ${CC} -o $@ xssstate.o ${LDFLAGS}
  22. clean:
  23. - @echo cleaning
  24. @rm -f xssstate ${OBJ} xssstate-${VERSION}.tar.gz
  25. dist: clean
  26. - @echo creating dist tarball
  27. - @mkdir -p xssstate-${VERSION}
  28. - @cp -R LICENSE README Makefile config.mk xsidle.sh \
  29. + mkdir -p xssstate-${VERSION}
  30. + cp -R LICENSE README Makefile config.mk xsidle.sh \
  31. xssstate.1 arg.h ${SRC} xssstate-${VERSION}
  32. - @tar -cf xssstate-${VERSION}.tar xssstate-${VERSION}
  33. - @gzip xssstate-${VERSION}.tar
  34. - @rm -rf xssstate-${VERSION}
  35. + tar -cf xssstate-${VERSION}.tar xssstate-${VERSION}
  36. + gzip xssstate-${VERSION}.tar
  37. + rm -rf xssstate-${VERSION}
  38. install: all
  39. - @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  40. - @mkdir -p ${DESTDIR}${PREFIX}/bin
  41. - @cp -f xssstate ${DESTDIR}${PREFIX}/bin
  42. - @chmod 755 ${DESTDIR}${PREFIX}/bin/xssstate
  43. - @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  44. - @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  45. - @sed "s/VERSION/${VERSION}/g" < xssstate.1 > ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  46. - @chmod 644 ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  47. + mkdir -p ${DESTDIR}${PREFIX}/bin
  48. + cp -f xssstate ${DESTDIR}${PREFIX}/bin
  49. + chmod 755 ${DESTDIR}${PREFIX}/bin/xssstate
  50. +# mkdir -p ${DESTDIR}${MANPREFIX}/man1
  51. +# @sed "s/VERSION/${VERSION}/g" < xssstate.1 > ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  52. +# @chmod 644 ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  53. uninstall:
  54. - @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  55. - @rm -f ${DESTDIR}${PREFIX}/bin/xssstate
  56. - @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  57. - @rm -f ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  58. + rm -f ${DESTDIR}${PREFIX}/bin/xssstate
  59. +# @rm -f ${DESTDIR}${MANPREFIX}/man1/xssstate.1
  60. .PHONY: all options clean dist install uninstall
  61. --- a/config.mk
  62. +++ b/config.mk
  63. @@ -13,13 +13,13 @@
  64. # flags
  65. CPPFLAGS = -DVERSION=\"${VERSION}\"
  66. -CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
  67. -LDFLAGS = -g ${LIBS}
  68. +CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
  69. +LDFLAGS += ${LIBS}
  70. # Solaris
  71. #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
  72. #LDFLAGS = ${LIBS}
  73. # compiler and linker
  74. -CC = cc
  75. +CC ?= cc