Am 21.03.2011 11:41, schrieb Michael Olbrich:
> 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.

Yes, this looks much better.

>>> # 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

Oops.

Thanks,
Thomas

--
ptxdist mailing list
[email protected]

Reply via email to