mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
Add two QA tests for staged ports:
- check for desktop files handling MIME types - check for share MIME-Info database Approved by: portmgr (bapt)
This commit is contained in:
parent
c9b9f1628c
commit
0a9a0a511f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=330020
@ -71,7 +71,27 @@ stripped() {
|
||||
done
|
||||
}
|
||||
|
||||
checks="shebang symlinks paths stripped"
|
||||
desktopfileutils() {
|
||||
if [ -z "${USESDESKTOPFILEUTILS}" ]; then
|
||||
grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null &&
|
||||
warn "you need USES=desktop-file-utils"
|
||||
else
|
||||
grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null ||
|
||||
warn "you may not need USES=desktop-file-utils"
|
||||
fi
|
||||
}
|
||||
|
||||
sharedmimeinfo() {
|
||||
if [ -z "${USESSHAREDMIMEINFO}" ]; then
|
||||
find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null &&
|
||||
warn "you need USES=shared-mime-info"
|
||||
else
|
||||
find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null ||
|
||||
warn "you may not need USES=shared-mime-info"
|
||||
fi
|
||||
}
|
||||
|
||||
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
|
||||
|
||||
ret=0
|
||||
cd ${STAGEDIR}
|
||||
|
@ -7,7 +7,9 @@ DESTDIRNAME?= DESTDIR
|
||||
|
||||
MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR}
|
||||
QA_ENV+= STAGEDIR=${STAGEDIR} PREFIX=${PREFIX} \
|
||||
LOCALBASE=${LOCALBASE}
|
||||
LOCALBASE=${LOCALBASE} \
|
||||
USESDESKTOPFILEUTILS=${USES:Mdesktop-file-utils} \
|
||||
USESSHAREDMIMEINFO=${USES:Mshared-mime-info}
|
||||
|
||||
.if !target(stage-dir)
|
||||
stage-dir:
|
||||
|
Loading…
Reference in New Issue
Block a user