[ACTION REQUIRED] ARCH=noarch uploads with cygport 0.22.0

Yaakov Selkowitz yselkowitz@cygwin.com
Wed May 11 20:08:00 GMT 2016


On 2016-05-11 12:56, Marco Atzeri wrote:
> On 11/05/2016 08:17, Yaakov Selkowitz wrote:
>> On 2016-05-11 00:07, Marco Atzeri wrote:
>>> So at this stage not the documentation subpackages, but only if all
>>> subpackages are in this category. correct ?
>>
>> At this time we are only considering those where all subpackages are
>> noarch, i.e. ARCH=noarch is (or will be) defined.
>>
>>> Not so sure if this case fit in your request;
>>> all the language files for tesseract
>> [snip]
>>> that are in the same tree of tesseract-ocr but
>>> they have independent minimalist setup.hint hand made.
>>
>> I don't understand, they don't have any external-source: nor a -src
>> package, so how are they built?
>
>
> just downloaded the specific language data from
>
> https://github.com/tesseract-ocr/tessdata
> https://github.com/tesseract-ocr/langdata

That sounds like two separate source packages then, although you're 
welcome to combine them.  FWIW Fedora's package builds these together 
with the program itself:

http://pkgs.fedoraproject.org/cgit/rpms/tesseract.git/tree/tesseract.spec

> copied in a <temp>/usr/share/tessdata and packaged.
>
> Making a source file was a waste of space as it will be a duplication
> of the binary.

That's not a factor.  All packages must have a source package, so that 
how the binary package(s) are built can be seen and reproduced.

> In theory I could do a noarch tesseract-ocr-language.cygport
> that skips build and for install just copies the data from
> the git and than packages the whole.
> I doubt that cygport accept an empty SRC_URI, but I have not yet tested it

There *is* a SRC_URI: the upstream repo!  If you want to do this 
separately, then something along the lines of:

NAME="tesseract-ocr-langdata"
VERSION=3.04.00
RELEASE=1
CATEGORY="Text"
SUMMARY="training files for tesseract-ocr"
DESCRIPTION="Source training data for Tesseract for lots of languages"
HOMEPAGE=
SRC_URI="https://github.com/tesseract-ocr/langdata/archive/${VERSION}/langdata-${VERSION}.tar.gz"
SRC_DIR="langdata-${VERSION}"

ARCH=noarch

PKG_NAMES="tesseract-training-core"
tesseract_training_core_CONTENTS="usr/share/tessdata/training/*.*"
for l in deu:German eng:English fra:French .....
do
   PKG_NAMES+=" tesseract-training-${l%:*}"
   declare tesseract_training_${l%:*}_SUMMARY="${l#*:} ${SUMMARY}"
   declare tesseract_training_${l%:*}_REQUIRES="tesseract-training-core"
   declare 
tesseract_training_${l%:*}_CONTENTS="usr/share/tessdata/training/${l%:*}/"
done

src_compile() { :; }

src_install() {
         dodir /usr/share/tessdata/training
         cp -pr ${S}/* ${D}/usr/share/tessdata/training/
}

-- 
Yaakov



More information about the Cygwin-apps mailing list