Check-in [1fda220a36]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fully working make package with pkgng
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1fda220a36f3d72c26f7a2d04bab0c3f73623644
User & Date: bapt 2012-06-07 13:53:39
Context
2012-06-07
13:58
Remove debug check-in: 0112cb835a user: bapt tags: trunk
13:53
Fully working make package with pkgng check-in: 1fda220a36 user: bapt tags: trunk
13:02
STAGE_ARGS only needed in make of fake-pkg check-in: d8703daead user: bapt tags: trunk
Changes

Changes to ports/Mk/bsd.pkgng.mk.

221
222
223
224
225
226
227



228
229






















































































230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
		exit 1; \
	fi
.endif # defined(DEFER_CONFLICTS_CHECK)
.endif
.endif

.if !target(do-package)




do-package: ${TMPPLIST}






















































































	@if [ -d ${PACKAGES} ]; then \
		if [ ! -d ${PKGREPOSITORY} ]; then \
			if ! ${MKDIR} ${PKGREPOSITORY}; then \
				${ECHO_MSG} "=> Can't create directory ${PKGREPOSITORY}."; \
				exit 1; \
			fi; \
		fi; \
	fi;
	@if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \
		if [ -d ${PACKAGES} ]; then \
			cd ${.CURDIR} && eval ${MAKE} package-links; \
		fi; \
	else \
		cd ${.CURDIR} && eval ${MAKE} delete-package; \
		exit 1; \
	fi







>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|







221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
		exit 1; \
	fi
.endif # defined(DEFER_CONFLICTS_CHECK)
.endif
.endif

.if !target(do-package)
.if ${USE_STAGE:L} == yes
STAGE_ARGS=	-r ${STAGEDIR} -p ${TMPPLIST} -m ${METADIR}
.endif

do-package: ${TMPPLIST}
.if ${USE_STAGE:M} == yes
	@${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"
	@${MKDIR} ${METADIR}
	@${ECHO_CMD} "name: ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}" > ${MANIFESTF} 
	@${ECHO_CMD} "version: ${PKGVERSION}" >> ${MANIFESTF} 
	@${ECHO_CMD} "origin: ${PKGORIGIN}" >> ${MANIFESTF} 
	@${ECHO_CMD} "comment: |" >> ${MANIFESTF}
	@${ECHO_CMD} "  "${COMMENT:Q} >> ${MANIFESTF}
	@${ECHO_CMD} "maintainer: ${MAINTAINER}" >> ${MANIFESTF}
	@${ECHO_CMD} "prefix: ${PREFIX}" >> ${MANIFESTF}
.if defined(WWW)
	@${ECHO_CMD} "www: ${WWW}" >> ${MANIFESTF}
.endif
	@${ECHO_CMD} "deps: " >> ${MANIFESTF}

	@${MAKE} -C ${.CURDIR} actual-package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u >> ${MANIFESTF}
	@${ECHO_CMD} -n "categories: [" >> ${MANIFESTF}
.for cat in ${CATEGORIES:u}
	@${ECHO_CMD} -n "${cat}," >> ${MANIFESTF}
.endfor
	@${ECHO_CMD} "]" >> ${MANIFESTF}
.if defined(LICENSE_COMB)
	@${ECHO_CMD} "licenselogic: ${LICENSE_COMB}" >> ${MANIFESTF}
.else
	@${ECHO_CMD} "licenselogic: single" >> ${MANIFESTF}
.endif
	@${ECHO_CMD} -n "licenses: [" >> ${MANIFESTF}
.for lic in ${LICENSE:u}
	@${ECHO_CMD} -n "${lic}," >> ${MANIFESTF}
.endfor
	@${ECHO_CMD} "]" >> ${MANIFESTF}
	@${ECHO_CMD} -n "users: [" >> ${MANIFESTF}
.for user in ${USERS:u}
	@${ECHO_CMD} -n "${user}, " >> ${MANIFESTF}
.endfor
	@${ECHO_CMD} "]" >> ${MANIFESTF}
	@${ECHO_CMD} -n "groups: [" >> ${MANIFESTF}
.for group in ${GROUPS:u}
	@${ECHO_CMD} -n "${group}, " >> ${MANIFESTF}
.endfor
	@${ECHO_CMD} "]" >> ${MANIFESTF}
	@${ECHO_CMD} -n "options: {" >> ${MANIFESTF}
.for opt in ${ALL_OPTIONS}
.if empty(PORT_OPTIONS:M${opt})
	@${ECHO_CMD} -n "${opt}: off," >> ${MANIFESTF}
.else
	@${ECHO_CMD} -n "${opt}: on," >> ${MANIFESTF}
.endif
.endfor
.for multi in ${OPTIONS_MULTI}
.  for opt in ${OPTIONS_MULTI_${multi}}
.    if empty(PORT_OPTIONS:M${opt})
	@${ECHO_MSG} -n "${opt}: off, " >> ${MANIFESTF}
.    else
	@${ECHO_MSG} -n "${opt}: on, " >> ${MANIFESTF}
.    endif
.  endfor
.endfor
.for single in ${OPTIONS_SINGLE}
.  for opt in ${OPTIONS_SINGLE_${single}}
.    if empty(PORT_OPTIONS:M${opt})
	@${ECHO_MSG} -n "${opt}: off, " >> ${MANIFESTF}
.    else
	@${ECHO_MSG} -n "${opt}: on, " >> ${MANIFESTF}
.    endif
.  endfor
.endfor
.undef multi
.undef single
.undef opt
	@${ECHO_CMD} "}" >> ${MANIFESTF}
	@[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \
	[ -f ${PKGPREINSTALL} ] && ${CP} ${PKGPREINSTALL} ${METADIR}/+PRE_INSTALL; \
	[ -f ${PKGPOSTINSTALL} ] && ${CP} ${PKGPOSTINSTALL} ${METADIR}/+POST_INSTALL; \
	[ -f ${PKGDEINSTALL} ] && ${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \
	[ -f ${PKGPREDEINSTALL} ] && ${CP} ${PKGPREDEINSTALL} ${METADIR}/+PRE_DEINSTALL; \
	[ -f ${PKGPOSTDEINSTALL} ] && ${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL; \
	[ -f ${PKGUPGRADE} ] && ${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \
	[ -f ${PKGPREUPGRADE} ] && ${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \
	[ -f ${PKGPOSTUPGRADE} ] && ${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE; \
	${CP} ${DESCR} ${METADIR}/+DESC; \
	[ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0
.if !defined(NO_MTREE)
	@[ -f ${MTREE_FILE} ] && ${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS || return 0
.endif
.endif
	@if [ -d ${PACKAGES} ]; then \
		if [ ! -d ${PKGREPOSITORY} ]; then \
			if ! ${MKDIR} ${PKGREPOSITORY}; then \
				${ECHO_MSG} "=> Can't create directory ${PKGREPOSITORY}."; \
				exit 1; \
			fi; \
		fi; \
	fi;
	if ${PKG_CREATE} ${STAGE_ARGS} -o ${PKGREPOSITORY} ${PKGNAME}; then \
		if [ -d ${PACKAGES} ]; then \
			cd ${.CURDIR} && eval ${MAKE} package-links; \
		fi; \
	else \
		cd ${.CURDIR} && eval ${MAKE} delete-package; \
		exit 1; \
	fi

Changes to ports/Mk/bsd.port.mk.

4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
				install-ldconfig-file install-license \
				install-desktop-entries add-plist-info add-plist-docs add-plist-examples \
				add-plist-data add-plist-post fix-plist-sequence
_INSTALL_DEP=	stage
_INSTALL_SEQ=	install-message sync-from-stage run-depends lib-depends fake-pkg security-check

_PACKAGE_DEP=	stage
_PACKAGE_SEEQ=	package-message pre-package pre-package-script do-package post-package-script
.else

_INSTALL_DEP=	build
_INSTALL_SEQ=	install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \
				pre-install-script generate-plist check-already-installed
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
				pre-su-install-script create-users-groups do-install \







|







4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
				install-ldconfig-file install-license \
				install-desktop-entries add-plist-info add-plist-docs add-plist-examples \
				add-plist-data add-plist-post fix-plist-sequence
_INSTALL_DEP=	stage
_INSTALL_SEQ=	install-message sync-from-stage run-depends lib-depends fake-pkg security-check

_PACKAGE_DEP=	stage
_PACKAGE_SEQ=	package-message pre-package pre-package-script do-package post-package-script
.else

_INSTALL_DEP=	build
_INSTALL_SEQ=	install-message check-install-conflicts run-depends lib-depends apply-slist pre-install \
				pre-install-script generate-plist check-already-installed
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
				pre-su-install-script create-users-groups do-install \