2014-10-29 18:13 GMT+02:00 Martin-Éric Racine <[email protected]>:
> 2014-10-29 17:19 GMT+02:00 Joey Hess <[email protected]>:
>> Martin-Éric Racine wrote:
>>> The manual states that --generate can be used to create the directory 
>>> structure for further manipulation.
>>>
>>> However, the command line sample given to get around building a *.deb will 
>>> result in a hidden file called "..deb" which is less than optimal. Here's a 
>>> better command line sample:
>>>
>>> sudo dpkg-deb --build . ../$(echo "$(grep Package DEBIAN/control | awk 
>>> {'print $2'})_$(grep Version DEBIAN/control | awk {'print $2'})_$(grep Arch 
>>> DEBIAN/control | awk {'print $2'}).deb")
>>>
>>> You're welcome. :)
>>
>>    The package can be built from
>>    this temporary directory by running "dpkg\-deb \-\-build", passing it the
>>    generated directory.
>>
>> joey@darkstar:~/tmp>fakeroot dpkg-repack --generate dpkg-repack
>> dpkg-repack: fakeroot run without its -u flag may corrupt some file 
>> permissions.
>> dpkg-repack: dpkg-repack: created ./dpkg-repack-23441 for dpkg-repack
>> joey@darkstar:~/tmp>dpkg-deb --build dpkg-repack-23441
>> dpkg-deb: building package `dpkg-repack' in `dpkg-repack-23441.deb'.
>
> Yes indeed. The source directory can be anything.
>
> The main point is that the above recipe will extract the package's
> name, version and arch from the control file to generate a meaningful
> file name for the *.deb.

Actually, re-reading the dpkg-deb man page, there is a simpler way:

fakeroot dpkg-deb --build dpkg-repack-13169 .

Adding that dot as $2 counts as a destination path and somehow makes
dpkg-deb extract the required information from $1/DEBIAN/control to
create the filename. This might be the simpler example that the
dpkg-repack man page would need as instructions to build the final
repack from a tree created by --generate. :)

Martin-Éric


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/debian-bugs-dist

Reply via email to