how to make a portfile for a github project?

macports at parvis.nl macports at parvis.nl
Fri Mar 2 23:16:59 UTC 2018


from https://github.com/rodneyrehm/CFPropertyList <https://github.com/rodneyrehm/CFPropertyList> i would like to create a local port.

my Portfile:
----------------------------------------------------------------------
# -*- 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

# 20180302 pdv created
# - version initially taken from https://github.com/rodneyrehm/CFPropertyList/releases

PortSystem          1.0
PortGroup           github 1.0
github.setup        rodneyrehm CFPropertyList 2.0.1
github.tarball_from releases

name                CFPropertyList
categories          php
platforms           darwin
license             MIT
maintainers         nomaintainer

description         PHP implementation of Apple's PropertyList
long_description    ${description}

master_sites        https://codeload.github.com/${github.author}/${github.project}/tar.gz/${version}

checksums           rmd160  a579aac7b18578f1b1a3c651037a0b79fb130db9 \
                    sha256  e64756a876f196c7acf2c91a9f55c8219fb5b7607a406a980a1907c8b92c4ffb

use_configure       no
build               {}
destroot {
    file mkdir ${destroot}${prefix}/lib/php/github
    copy ${worksrcpath} ${destroot}${prefix}/lib/php/github/${github.project}
}

livecheck.type      regex
livecheck.url       https://github.com/${github.author}/${github.project}/releases
livecheck.regex     archive/(\[^"\]+)${extract.suffix}

#EOF
----------------------------------------------------------------------
and i know the checksums do not yet match.

my log extract:
----------------------------------------------------------------------
$ sudo port install CFPropertyList
Portfile changed since last build; discarding previous state.
--->  Fetching distfiles for CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from https://distfiles.macports.org/CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from http://lil.fr.distfiles.macports.org/CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from http://nue.de.distfiles.macports.org/CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/CFPropertyList
--->  Attempting to fetch CFPropertyList-2.0.1.tar.gz from 
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://codeload.github.com/rodneyrehm/CFPropertyList/tar.gz/2.0.1
(and some more)
----------------------------------------------------------------------
apparently there is something wrong in the 'master_sites'. i took this from a working example for php pear tcpdf.

i understood from http://thegreyblog.blogspot.nl/2014/08/writing-macports-portfile-and-testing.html that github is a standard feature in macports but i cannot find better documentation.

Q1: can anyone help me on this?

Q2: is it perhaps better to user php composer (not available from macports)?

thanks,
pdv.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20180303/2e816c32/attachment.html>


More information about the macports-users mailing list