]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
osx: patch the installation of launchd plist file for Homebrew
authorVincent Bernat <bernat@luffy.cx>
Sat, 13 Jul 2013 15:40:01 +0000 (17:40 +0200)
committerVincent Bernat <bernat@luffy.cx>
Sat, 13 Jul 2013 15:40:01 +0000 (17:40 +0200)
osx/dont-install-launchd-plist.patch [new file with mode: 0644]
osx/lldpd.rb

diff --git a/osx/dont-install-launchd-plist.patch b/osx/dont-install-launchd-plist.patch
new file mode 100644 (file)
index 0000000..1d60466
--- /dev/null
@@ -0,0 +1,36 @@
+Disable installation of the provided plist file for launchd.
+
+This file is installed at a fixed location outside of the prefix. This
+makes Homebrew fails. In the future, a configure option will be
+provided to avoid the installation of such a file.
+
+This patch is targeted at lldpd-0.7.6 only.
+
+diff -Naur lldpd-0.7.6.orig/osx/Makefile.am lldpd-0.7.6/osx/Makefile.am
+--- lldpd-0.7.6.orig/osx/Makefile.am   2013-06-26 08:47:50.000000000 +0200
++++ lldpd-0.7.6/osx/Makefile.am        2013-07-13 17:36:09.259797663 +0200
+@@ -58,10 +58,7 @@
+ # Install launchd plist
+ install-data-local:
+-      install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons
+-      install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons
+ uninstall-local:
+-      rm -rf $(DESTDIR)/Library/LaunchDaemons
+ clean-local:
+       rm -rf $(ARCHS)
+       rm -rf $(PKG_DIR)
+diff -Naur lldpd-0.7.6.orig/osx/Makefile.in lldpd-0.7.6/osx/Makefile.in
+--- lldpd-0.7.6.orig/osx/Makefile.in   2013-07-12 10:09:06.000000000 +0200
++++ lldpd-0.7.6/osx/Makefile.in        2013-07-13 17:35:43.195283824 +0200
+@@ -541,10 +541,7 @@
+ # Install launchd plist
+ @HOST_OS_OSX_TRUE@install-data-local:
+-@HOST_OS_OSX_TRUE@    install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons
+-@HOST_OS_OSX_TRUE@    install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons
+ @HOST_OS_OSX_TRUE@uninstall-local:
+-@HOST_OS_OSX_TRUE@    rm -rf $(DESTDIR)/Library/LaunchDaemons
+ @HOST_OS_OSX_TRUE@clean-local:
+ @HOST_OS_OSX_TRUE@    rm -rf $(ARCHS)
+ @HOST_OS_OSX_TRUE@    rm -rf $(PKG_DIR)
index 334704c0f701de162282b81d1be0e4d2c4212c7d..db120a5a91967bdc004a563e1de5e25655db41b0 100644 (file)
@@ -1,7 +1,7 @@
 require 'formula'
 
 class Lldpd < Formula
-  homepage 'http://vincentbernat.github.com/lldpd/'
+  homepage 'http://vincentbernat.github.io/lldpd/'
   url 'http://media.luffy.cx/files/lldpd/lldpd-0.7.6.tar.gz'
   sha1 'be3d3937b22d14259553f637694f744ed3b8ba79'
 
@@ -14,6 +14,10 @@ class Lldpd < Formula
   depends_on 'net-snmp' if build.include? 'with-snmp'
   depends_on 'jansson'  if build.include? 'with-json'
 
+  def patches
+    # Don't try to install provided launchd plist (outside of prefix)
+    "https://raw.github.com/vincentbernat/lldpd/master/osx/dont-install-launchd-plist.patch"
+
   def install
     readline = Formula.factory 'readline'
     args = [ "--prefix=#{prefix}",