| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.73 2018/07/25 21:30:45 abs Exp $ | | 1 | # $NetBSD: Makefile,v 1.74 2018/07/28 09:03:25 wiz Exp $ |
2 | | | 2 | |
3 | # Upstream regularly breaks protocol compatibility. While users of | | 3 | # Upstream regularly breaks protocol compatibility. While users of |
4 | # pkgsrc syncthing on multiple systems can update synchronously, an | | 4 | # pkgsrc syncthing on multiple systems can update synchronously, an |
5 | # important use case is interoperating with syncthing-android. | | 5 | # important use case is interoperating with syncthing-android. |
6 | # Therefore, pkgsrc will update to a new major version (e.g. 0.12.x vs | | 6 | # Therefore, pkgsrc will update to a new major version (e.g. 0.12.x vs |
7 | # 0.11.x) when a corresponding syncthing-android version becomes | | 7 | # 0.11.x) when a corresponding syncthing-android version becomes |
8 | # available in the f-droid.org repository: | | 8 | # available in the f-droid.org repository: |
9 | # https://f-droid.org/repository/browse/?fdid=com.nutomic.syncthingandroid | | 9 | # https://f-droid.org/repository/browse/?fdid=com.nutomic.syncthingandroid |
10 | # Updates to new major versions must be tested against the android | | 10 | # Updates to new major versions must be tested against the android |
11 | # version from f-droid prior to commiting. (This is an attempt to | | 11 | # version from f-droid prior to commiting. (This is an attempt to |
12 | # avoid having to version syncthing in pkgsrc.) | | 12 | # avoid having to version syncthing in pkgsrc.) |
13 | # Note that the android versioning is disconnected from syncthing versioning; | | 13 | # Note that the android versioning is disconnected from syncthing versioning; |
14 | # see https://github.com/syncthing/syncthing-android/issues/652 for | | 14 | # see https://github.com/syncthing/syncthing-android/issues/652 for |
| @@ -61,26 +61,31 @@ WRKPLACE= ${WRKPLACEP}/syncthing | | | @@ -61,26 +61,31 @@ WRKPLACE= ${WRKPLACEP}/syncthing |
61 | | | 61 | |
62 | MAKE_ENV+= GOPATH=${GOPATH} GOCACHE=${WRKDIR}/.cache | | 62 | MAKE_ENV+= GOPATH=${GOPATH} GOCACHE=${WRKDIR}/.cache |
63 | | | 63 | |
64 | CHECK_RELRO_SKIP+= bin/syncthing | | 64 | CHECK_RELRO_SKIP+= bin/syncthing |
65 | | | 65 | |
66 | SUBST_CLASSES+= version | | 66 | SUBST_CLASSES+= version |
67 | SUBST_STAGE.version= pre-build | | 67 | SUBST_STAGE.version= pre-build |
68 | SUBST_MESSAGE.version= Fixing version string | | 68 | SUBST_MESSAGE.version= Fixing version string |
69 | SUBST_FILES.version= build.go | | 69 | SUBST_FILES.version= build.go |
70 | SUBST_SED.version= -e 's|runError("git", "describe", "--always", "--dirty")|runError("echo","v${PKGVERSION_NOREV}")|' | | 70 | SUBST_SED.version= -e 's|runError("git", "describe", "--always", "--dirty")|runError("echo","v${PKGVERSION_NOREV}")|' |
71 | SUBST_SED.version+= -e 's|runError("git", "show", "-s", "--format=%ct")|runError("false")|' | | 71 | SUBST_SED.version+= -e 's|runError("git", "show", "-s", "--format=%ct")|runError("false")|' |
72 | SUBST_SED.version+= -e 's|"go"|"${GO}"|' | | 72 | SUBST_SED.version+= -e 's|"go"|"${GO}"|' |
73 | | | 73 | |
| | | 74 | SUBST_CLASSES+= go |
| | | 75 | SUBST_STAGE.go= pre-build |
| | | 76 | SUBST_MESSAGE.go= Fixing go executable reference |
| | | 77 | SUBST_FILES.go= lib/auto/doc.go cmd/strelaypoolsrv/auto/doc.go |
| | | 78 | SUBST_SED.go+= -e 's|go run|"${GO}" run|' |
74 | | | 79 | |
75 | # Create WRKPLACE's parent, but not WRKPLACE. Move the contents of | | 80 | # Create WRKPLACE's parent, but not WRKPLACE. Move the contents of |
76 | # the distribution tarball to the directory name desired by upstream's | | 81 | # the distribution tarball to the directory name desired by upstream's |
77 | # build instructions. Make a symlink so that the rest of the pkgsrc | | 82 | # build instructions. Make a symlink so that the rest of the pkgsrc |
78 | # machinery that expects ${WRKSRC} to contain the tarball contents | | 83 | # machinery that expects ${WRKSRC} to contain the tarball contents |
79 | # works. | | 84 | # works. |
80 | post-extract: | | 85 | post-extract: |
81 | ${MKDIR} ${GOPATH}/src/github.com/syncthing/ | | 86 | ${MKDIR} ${GOPATH}/src/github.com/syncthing/ |
82 | ${MV} ${WRKSRC} ${WRKPLACE} | | 87 | ${MV} ${WRKSRC} ${WRKPLACE} |
83 | ${LN} -s ${WRKPLACE} ${WRKSRC} | | 88 | ${LN} -s ${WRKPLACE} ${WRKSRC} |
84 | | | 89 | |
85 | do-build: | | 90 | do-build: |
86 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO} run build.go build syncthing | | 91 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO} run build.go build syncthing |