Hi,

On Fri, Mar 18, 2011 at 10:17:45PM +0100, Thomas Heller wrote:
> 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

I would do this in targetinstall:
[...]
        @$(call install_finish, mypkg)
        @install -D -m644 
"$(PKGDIR)/mypkg_$(MYPKG_VERSION)_$(PTXDIST_IPKG_ARCH_STRING).ipk" 
$(PTXDIST_WORKSPACE)/../mypkg.ipk
[...]
or something like that.

> > # start service after installation
> > if [ -x /etc/init.d/dacd ] && [ -z "$DESTDIR" ]; then

if [ -x /etc/init.d/dacd -a -z "$DESTDIR" ]; then

> >     /etc/init.d/dacd start
> > fi
> 
> Does this approach make sense?  Is there a better way?

Regards,
Michael Olbrich

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to