I build a custom package with ptxdist.  I want this package to
appear inside the root filesystem as <name>_1.0_<arch>.ipk, but also
in some other directory (on the build host) with the generic name
<name>.ipk.

Since the postinstall script also runs on the host when I do
ptxdist targetinstall <name>, I came up with this approach
inside the rules/<name>.postinst file:

> #!/bin/sh
>
> if [ ! -z "$DESTDIR" ]; then
> src=${ptx_pkg_dir}/${pkg_label}_${pkg_version}_${PTXDIST_IPKG_ARCH_STRING}.ipk
>     dst=${ptx_pkg_dir}/../../../${pkg_label}.ipk
>     echo Copying package $src
>     echo "          " to $dst
>     cp $src $dst
> fi
>
> # start service after installation
> if [ -x /etc/init.d/dacd ] && [ -z "$DESTDIR" ]; then
>     /etc/init.d/dacd start
> fi

Does this approach make sense?  Is there a better way?

Thanks,
Thomas

--
ptxdist mailing list
[email protected]

Reply via email to