source: trunk/dports/security/certsync/Portfile

Last change on this file was 136960, checked in by cal@…, 2 years ago

certsync: Bump version to force a rebuild fixing #47906, openmaintainer

I'm not increasing revision here, because we are the upstream for this project.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 136960 2015-05-31 17:41:40Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                certsync
7version             1.1.3
8categories          security
9conflicts           curl-ca-bundle
10maintainers         landonf openmaintainer
11description         Export x509 CAs from the Mac OS X Keychain.
12long_description    \
13    The package implements exporting of x509 CAs from the Mac OS X keychain, \
14    for use by OpenSSL and gnutls.
15homepage            http://www.macports.org
16license             MIT
17platforms           darwin
18
19installs_libs       no
20
21distfiles
22
23extract.mkdir       yes
24post-extract {
25    xinstall -m 644 -W ${filespath} certsync.m compat.h certsync.plist update-ca-certificates ${worksrcpath}
26}
27
28post-patch {
29    reinplace "s|@PREFIX@|${prefix}|g" \
30        ${worksrcpath}/update-ca-certificates \
31        ${worksrcpath}/certsync.plist
32
33    reinplace "s|@LABEL@|${startupitem.uniquename}|g" ${worksrcpath}/certsync.plist
34}
35
36use_configure       no
37
38variant universal {}
39
40# We inject our own launchd plist to allow the use of WatchPaths
41startupitem.create  no
42startupitem.autostart yes
43
44build {
45    system -W ${worksrcpath} "${configure.objc} \
46        ${configure.objcflags} \
47        -mmacosx-version-min=10.4 \
48        -Wall \
49        certsync.m -o certsync \
50        ${configure.ldflags} \
51        [get_canonical_archflags ld] \
52        -framework Foundation -framework Security -framework CoreServices"
53}
54
55destroot {
56    # Install the binaries
57    xinstall -m 755 -W ${worksrcpath} certsync ${destroot}${prefix}/libexec
58    xinstall -m 755 -W ${worksrcpath} update-ca-certificates ${destroot}${prefix}/bin
59
60    # Install our custom plist
61    set launchd_dir "${prefix}/etc/${startupitem.location}/${startupitem.uniquename}"
62    xinstall -m 755 -d ${destroot}/${launchd_dir}
63    xinstall -m 644 -W ${worksrcpath} certsync.plist  ${destroot}/${launchd_dir}/${startupitem.plist}
64
65    if {[getuid] == 0 && ${startupitem.install} != "no"} {
66        file mkdir "${destroot}/Library/${startupitem.location}"
67        ln -sf "${launchd_dir}/${startupitem.plist}" "${destroot}/Library/${startupitem.location}"
68    }
69
70    # Provide backwards compatibility with curl-ca-bundle
71    xinstall -d "${destroot}${prefix}/share/curl"
72    ln -s ${prefix}/etc/openssl/cert.pem ${destroot}${prefix}/share/curl/curl-ca-bundle.crt
73}
74
75post-activate {
76    system "${prefix}/bin/update-ca-certificates"
77}
78
79pre-deactivate {
80    delete "${prefix}/etc/openssl/cert.pem"
81}
Note: See TracBrowser for help on using the repository browser.