Unverified Commit b5e7365e authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

ipp-usb: fix man page being installed into double PREFIX, use --replace-fail everywhere (#459857)

parents 6ad09e40 f9d65f37
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -21,11 +21,13 @@ buildGoModule rec {
  postPatch = ''
    # rebuild with patched paths
    rm ipp-usb.8
    substituteInPlace Makefile --replace "install: all" "install: man"
    substituteInPlace systemd-udev/ipp-usb.service --replace "/sbin" "$out/bin"
    for i in Makefile paths.go ipp-usb.8.md; do
      substituteInPlace $i --replace "/usr" "$out"
      substituteInPlace $i --replace "/var/ipp-usb" "/var/lib/ipp-usb"
    substituteInPlace Makefile \
      --replace-fail "install: all" "install: man" \
      --replace-fail "/usr/" "/"
    substituteInPlace systemd-udev/ipp-usb.service --replace-fail "/sbin" "$out/bin"
    for i in paths.go ipp-usb.8.md; do
      substituteInPlace $i --replace-fail "/usr" "$out"
      substituteInPlace $i --replace-fail "/var/ipp-usb" "/var/lib/ipp-usb"
    done
  '';

@@ -43,7 +45,7 @@ buildGoModule rec {
  doInstallCheck = true;

  postInstall = ''
    # to accomodate the makefile
    # to accommodate the makefile
    cp $out/bin/ipp-usb .
    make install DESTDIR=$out
  '';