OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
4.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../incron/incron-0.5.9-Makefile.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 3f4e9ad5e9cf57fabdcaa3c1bc296b449c061a1b Mon Sep 17 00:00:00 2001
  17. From: Christian Ruppert <idl0r@gentoo.org>
  18. Date: Mon, 31 Jan 2011 16:00:34 +0100
  19. Subject: [PATCH 2/2] Some improvements
  20. Respect DESTDIR.
  21. Don't override CXX/CXXFLAGS/LDFLAGS.
  22. Create all necessary directories during install.
  23. Install the example configuration into $(PREFIX)/share/doc/... instead of /etc.
  24. ---
  25. Makefile | 57 +++++++++++++++++++++++++++++----------------------------
  26. 1 files changed, 29 insertions(+), 28 deletions(-)
  27. diff --git a/Makefile b/Makefile
  28. index ded8e68..3ffc854 100644
  29. --- a/Makefile
  30. +++ b/Makefile
  31. @@ -1,15 +1,15 @@
  32. -
  33. PREFIX = /usr/local
  34. USERDATADIR = /var/spool/incron
  35. SYSDATADIR = /etc/incron.d
  36. CFGDIR = /etc
  37. -MANPATH = /usr/share/man
  38. +MANPATH = $(PREFIX)/share/man
  39. RELEASE = incron-`cat VERSION`
  40. RELEASEDIR = /tmp/$(RELEASE)
  41. +DOCDIR = $(PREFIX)/share/doc/$(RELEASE)/
  42. USER = root
  43. -CXX = g++
  44. +CXX ?= g++
  45. INSTALL = install
  46. OPTIMIZE = -O2
  47. @@ -17,8 +17,8 @@ DEBUG = -g0
  48. WARNINGS = -Wall
  49. CXXAUX = -pipe
  50. -CXXFLAGS = $(OPTIMIZE) $(DEBUG) $(WARNINGS) $(CXXAUX)
  51. -LDFLAGS = $(WARNINGS)
  52. +CXXFLAGS ?= $(OPTIMIZE) $(DEBUG) $(CXXAUX)
  53. +CXXFLAGS += $(WARNINGS)
  54. PROGRAMS = incrond incrontab
  55. @@ -29,10 +29,10 @@ INCRONTAB_OBJ = ict-main.o incrontab.o inotify-cxx.o strtok.o incroncfg.o apparg
  56. all: $(PROGRAMS)
  57. incrond: $(INCROND_OBJ)
  58. - $(CXX) $(LDFLAGS) -o $@ $(INCROND_OBJ)
  59. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCROND_OBJ)
  60. incrontab: $(INCRONTAB_OBJ)
  61. - $(CXX) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ)
  62. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(INCRONTAB_OBJ)
  63. .cpp.o:
  64. $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
  65. @@ -44,33 +44,34 @@ clean:
  66. distclean: clean
  67. install: all install-man
  68. - [ -d $(PREFIX) ]
  69. - $(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/
  70. - $(INSTALL) -m 0755 incrond $(PREFIX)/sbin/
  71. - $(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR)
  72. - $(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
  73. - $(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
  74. + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin/
  75. + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/sbin/
  76. + $(INSTALL) -m 0755 -d $(DESTDIR)$(DOCDIR)/
  77. + $(INSTALL) -m 04755 -o $(USER) incrontab $(DESTDIR)$(PREFIX)/bin/
  78. + $(INSTALL) -m 0755 incrond $(DESTDIR)$(PREFIX)/sbin/
  79. + $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(USERDATADIR)
  80. + $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(SYSDATADIR)
  81. + $(INSTALL) -m 0644 incron.conf.example $(DESTDIR)$(DOCDIR)/
  82. install-man: incrontab.1 incrontab.5 incrond.8 incron.conf.5
  83. - $(INSTALL) -m 0755 -d $(MANPATH)/man1
  84. - $(INSTALL) -m 0755 -d $(MANPATH)/man5
  85. - $(INSTALL) -m 0755 -d $(MANPATH)/man8
  86. - $(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
  87. - $(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
  88. - $(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
  89. - $(INSTALL) -m 0644 incron.conf.5 $(MANPATH)/man5
  90. + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man1
  91. + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man5
  92. + $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man8
  93. + $(INSTALL) -m 0644 incrontab.1 $(DESTDIR)$(MANPATH)/man1
  94. + $(INSTALL) -m 0644 incrontab.5 $(DESTDIR)$(MANPATH)/man5
  95. + $(INSTALL) -m 0644 incrond.8 $(DESTDIR)$(MANPATH)/man8
  96. + $(INSTALL) -m 0644 incron.conf.5 $(DESTDIR)$(MANPATH)/man5
  97. uninstall: uninstall-man
  98. - [ -d $(PREFIX) ]
  99. - rm -f $(PREFIX)/bin/incrontab
  100. - rm -f $(PREFIX)/sbin/incrond
  101. - rm -f $(CFGDIR)/incron.conf.example
  102. + rm -f $(DESTDIR)$(PREFIX)/bin/incrontab
  103. + rm -f $(DESTDIR)$(PREFIX)/sbin/incrond
  104. + rm -rf $(DESTDIR)$(DOCDIR)/
  105. uninstall-man:
  106. - rm -f $(MANPATH)/man1/incrontab.1
  107. - rm -f $(MANPATH)/man5/incrontab.5
  108. - rm -f $(MANPATH)/man8/incrond.8
  109. - rm -f $(MANPATH)/man5/incron.conf.5
  110. + rm -f $(DESTDIR)$(MANPATH)/man1/incrontab.1
  111. + rm -f $(DESTDIR)$(MANPATH)/man5/incrontab.5
  112. + rm -f $(DESTDIR)$(MANPATH)/man8/incrond.8
  113. + rm -f $(DESTDIR)$(MANPATH)/man5/incron.conf.5
  114. update: uninstall install
  115. --
  116. 1.7.3.4