Ticket #53351: patch_port_shared-mime-info_support_packaging.diff

File patch_port_shared-mime-info_support_packaging.diff, 1.1 KB (added by ctreleaven (Craig Treleaven), 8 years ago)
  • devel/shared-mime-info/Portfile

    diff --git a/devel/shared-mime-info/Portfile b/devel/shared-mime-info/Portfile
    index 24121a70e0..4e41c1fea0 100644
    a b post-activate { 
    5858    system "env XDG_DATA_DIRS=${prefix}/share ${prefix}/bin/update-mime-database -V ${prefix}/share/mime"
    5959}
    6060
     61pre-pkg {
     62        file copy ${filespath}/postinstall \
     63                ${package.scripts}/
     64        reinplace -locale C "s|@PREFIX@|${prefix}|g" \
     65                ${package.scripts}/postinstall
     66        file attributes ${package.scripts}/postinstall -permissions 0755
     67        long_description-append '  Install prefix: ${prefix}'
     68}
     69
    6170livecheck.type      regex
    6271livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
  • new file devel/shared-mime-info/files/postinstall

    diff --git a/devel/shared-mime-info/files/postinstall b/devel/shared-mime-info/files/postinstall
    new file mode 100755
    index 0000000000..f23da33859
    - +  
     1#!/bin/sh
     2
     3# shared-mime-info installer support, postinstall script
     4# runs as root after installer successfully copies payload to destination
     5
     6env XDG_DATA_DIRS=@PREFIX@/share @PREFIX@/bin/update-mime-database -V @PREFIX@/share/mime