On Sun, 5 Feb 2023 16:34:19 +0000 Jon Turney wrote: > On 05/02/2023 08:38, Takashi Yano via Cygwin-apps wrote: > > I would like to propose new package AMF, which is > > codec-headers for AMD GPUs. This is needed by ffmpeg > > package I had proposed, and also provided for ffmpeg-free > > package in fedora. > > > > I already prepared the package at the following location. > > > > https://tyan0.yr32.net/cygwin/noarch/release/AMF/ > > A comment in the cygport saying what the src_unpack_hook is doing, and > why would be helpful. > > A comment by the "noarch" saying "this is noarch because it's just > header files" would be helpful. > > Otherwise, looks good.
Thanks for the advice. I revised the cygport file as attached. Is this as you expected? -- Takashi Yano <takashi.y...@nifty.ne.jp>
NAME="AMF" VERSION=1.4.29 RELEASE=1 LICENSE="MIT" CATEGORY="Devel" SUMMARY="Advanced Media Framework (AMF) SDK" DESCRIPTION="A light-weight, portable multimedia framework that abstracts away most of the platform and API-specific details. AMF is supported on the closed source AMD Pro driver and OpenMax on the open source AMD Mesa driver." HOMEPAGE="https://gpuopen.com/advanced-media-framework/" ARCH="noarch" # This is noarch because it's just header files. SRC_URI="${NAME}-cleaned-${VERSION}.tar.xz" # Make dummy source file for prep if the cleaned one is not exist. if [ ! -f ${SRC_URI} ] then mkdir ${NAME}-${VERSION} touch ${NAME}-${VERSION}/dummy tar acf ${SRC_URI} ${NAME}-${VERSION} rm -rf ${NAME}-${VERSION} fi CYGPORT_USE_UNSTABLE_API=1 src_unpack_hook() { if [ $(tar tvf ../../../${SRC_URI} | wc -l) -eq 2 ] # Source file is dummy then NV=${NAME}-${VERSION} pushd .. rm -rf ${NV} # Remove dummy source file. # Download original source file. wget https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v${VERSION}.tar.gz tar xf v${VERSION}.tar.gz rm -f v${VERSION}.tar.gz # Remove unnecessary files. rm -rf ${NV}/Thirdparty ${NV}/amf/public/common ${NV}/amf/public/make ${NV}/amf/public/proj ${NV}/amf/public/props ${NV}/amf/public/samples ${NV}/amf/public/src ${NV}/amf/doc ${NV}/.github # Make cleaned source file which has only necessary header files. tar acf ../../${NAME}-cleaned-${VERSION}.tar.xz ${NV} popd fi } src_compile() { : } src_install() { mkdir -p ${D}/usr/include # Just make symlink for header files. ln -fs ${S}/amf/public/include ${D}/usr/include/${NAME} }