On 12/15/2014 11:10 AM, Ramon Medeiros wrote:
On 12/15/2014 10:16 AM, Aline Manera wrote:
>
> On 12/12/2014 11:52 AM, Ramon Medeiros wrote:
>> Add the directory structure in the buildroot. Dpkg automatically
>> removes
>> empty directories.
>>
>> Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
>> ---
>> contrib/make-deb.sh.in | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/contrib/make-deb.sh.in b/contrib/make-deb.sh.in
>> index 5a6e56a..2939b96 100644
>> --- a/contrib/make-deb.sh.in
>> +++ b/contrib/make-deb.sh.in
>> @@ -10,6 +10,10 @@ fi
>>
>> TMPDIR=`mktemp -d`
>
>> +# create /var/lib/kimchi structure
>> +mkdir -p
>> $TMPDIR/var/lib/kimchi/{debugreports,screenshots,vnc-tokens,isos}
>> +touch $TMPDIR/var/lib/kimchi/objectstore
>> +
>
> Move it to Makefile.am (deb target) and use the autoconf macros to
> create the dirs.
>
ok
> And don't you need to modify contrib/DEBIAN/postrm script to remove
> the dirs when needed?
>
No, dpkg automatically remove directories only if they are empty.
Tested this on ubuntu 14.04
Thanks for explaining.
>> make DESTDIR=$TMPDIR install-deb
>> dpkg-deb -b $TMPDIR kimchi-${VERSION}-${RELEASE}.noarch.deb
>> rm -rf $TMPDIR
>