delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/11/05:41:44

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=AdOdT7QrEPpbNrj5kV1/u4Y7w4vFn48iWkZ61OKeKSIyFU7PLfdRX
fxf4D/T22hVCxkbMHT/nptKdBcAJ6E8ex6UcbqZvrsa7Qg3RSUaj8qM9NPpakddl
KnwSclCXREO+uGDpYZuJd92u+7qpDDTrG0I+etd9rFQ/6UpN2aNM88=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=r8G8hQiD5cBIY7VW2zEfOUux8Bg=; b=dbr1wEUA8QAVQNjgJJuZpl12TSyh
hc6pjwX1VxvLmi2VyK3P1QO/54Umo2C+yXMP8Av0E/g3u/A3v2vEkvDex3rDqcX3
WsdugFP+Q6WwQihsvXuc3VhizMWFQoREO52XxDvmKRqwSPFbai4T6jcl0xy0jDD0
9WWXSoXf7TTtNzc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Achim Gratz <Stromeko AT NexGo DOT DE>
Subject: Re: Managing packages from command line
Date: Wed, 11 Feb 2015 10:36:04 +0000 (UTC)
Lines: 46
Message-ID: <loom.20150211T112804-639@post.gmane.org>
References: <006c01d045e2$a59d76b0$f0d86410$%fedin AT samsung DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Pavel Fedin <p.fedin <at> samsung.com> writes:
>  The next step is to install the newly built package. I try to feed my
> directory with the package to setup.exe in "install from local directory"
> mode, but looks like it needs complete repository with setup.ini file, which
> i obviously don't have. I would like just to install the package without the
> need to generate repository. Is it possible ?

If the package is simple enough:

----cygpack.sh----
#!/usr/bin/sh
ARCH=$(/usr/bin/arch)
CYGPORT=/usr/bin/cygport
CYGDOALL="finish download prep compile inst depend package test"
DIFF=/usr/bin/diff
TAR=/usr/bin/tar
TEE=/usr/bin/tee
CP=/usr/bin/cp
export PAGER=/usr/bin/cat

#set -x

p=${1%.cygport} && shift
eval "$(grep 'ARCH=' $p.cygport)"
arch=$ARCH && arch=${arch//i6/x}
pa=$p.$arch
da=difflog.$arch
patch=$pa/patch/$p.src.patch

2>&1 $CYGPORT $p $CYGDOALL | $TEE $pa.log
[ -s $patch ] && cp -p $patch .
( $DIFF -u $pa.log{old,} || cat $pa.log ) >> $da
$TAR -C / -xvf $pa/dist/$p/$p*[0-9].tar.xz | gzip -9c > /etc/setup/$p.lst.gz
egrep "^$p " /etc/setup/installed.db || echo "$p $p-0-0.tar.bz2 0" >>
/etc/setup/installed.db
------------------

If you already have the package files, you just need the last two lines. 
This does not run any postinstall scripts, so if your packages need them
you'll have to add some more code.  It also doesn't do the pre-remove and
the rm of the original files, both of which aren't a problem for what I'm
using it for, but you may want to think about adding this.


Regards,
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019