On Sat, Aug 21, 2010 at 1:30 PM, Adam Hani Schakaki <[email protected]> wrote:
> On Sun, 22 Aug 2010 02:21:52 +0800
> Ray Rashif <[email protected]> wrote:
>
>> On 22 August 2010 01:50, Adam Hani Schakaki <[email protected]> wrote:
>> > On Sun, 22 Aug 2010 01:37:33 +0800
>> > Ray Rashif <[email protected]> wrote:
>> >
>> >> On 22 August 2010 00:56, Adam Hani Schakaki <[email protected]> wrote:
>> >> > I need to find a way to get the md5 hash sums.
>> >>
>> >> You just need to use makepkg -s to generate them: But of course, you
>> >> need to verify that your own download is sane, else, you will be
>> >> distributing the wrong checksums. Not to worry, as long as your
>> >> download completed fine I would say there is no need to check with an
>> >> upstream hash file.
>> >>
>> >>
>> >> --
>> >> GPG/PGP ID: B42DDCAD
>> > Sure, this would be the normal way. But I need two different sets of hash 
>> > sums. One for the 32bits files and one for the 64bits files. That's the 
>> > problem.
>> >
>> > Excerpt of the current PKGBUILD:
>> > _source_x86_64=(
>> >        ${_srcurl}_64/${_ooobasis}-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-base-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-binfilter-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-calc-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-draw-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-help-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-impress-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-math-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-res-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/${_ooobasis}-writer-${_intver}.x86_64.rpm
>> >        ${_srcurl}_64/3.2.1/openoffice.org3-af-${_intver}.x86_64.rpm
>> > )
>> > _source_x86=(
>> >        ${_srcurl}/${_ooobasis}-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-base-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-binfilter-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-calc-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-draw-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-help-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-impress-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-math-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-res-${_intver}.i586.rpm
>> >        ${_srcurl}/${_ooobasis}-writer-${_intver}.i586.rpm
>> >        ${_srcurl}/3.2.1/openoffice.org3-af-${_intver}.i586.rpm
>> > )
>> >
>> > _md5sums_x86_64=()
>> > _md5sums_x86=()
>> > source=(${_source_x...@]})
>> > md5sums=(${_md5sums_x...@]})
>>
>> s/makepkg -s/makepkg -g/
>>
>> A lot of typos today.
>>
>> Well, place:
>>
>> CARCH=x86_64
>>
>> Somewhere before the source array on the second run. Then just copy and 
>> paste.
>>
>> if [ "$CARCH" = "x86_64" ]; then
>>   md5sums=(..)
>> fi
>>
>>
>> --
>> GPG/PGP ID: B42DDCAD
> No problem with one package, but a problem with around a hundred of them. I 
> create them by script. So awk should do the job, but my skills aren't enough 
> for that. So I have to figure out how exactly to do that.
> This is what I found in the forum: { rm PKGBUILD; awk '$0 ~ /^md5sums/ {i = 
> 1; system("makepkg -g 2>/dev/null")}; !i {print}; $0 ~ /\)/ {i = 0}' > 
> PKGBUILD; } < PKGBUILD
> Now I have to replace in the output of makepkg -g md5sums to md5sums_x86_64 
> and rerun that with CARCH="x86".
>
> Adam Hani Schakaki
>

Well, I'm asking you to run namcap on one package to see if you could
avoid having to define two independent source arrays, because if one
package contains only arch independent files, then you could just use
one arch to create an 'any' package.

Reply via email to