[Kimchi-devel] [PATCH] bug fix: Package doc html files into deb package
Sheldon
shaohef at linux.vnet.ibm.com
Tue Feb 18 14:47:08 UTC 2014
On 02/18/2014 09:55 PM, Aline Manera wrote:
> On 02/18/2014 10:36 AM, Sheldon wrote:
>> On 02/18/2014 08:39 PM, Aline Manera wrote:
>>> On 02/18/2014 09:22 AM, Aline Manera wrote:
>>>> On 02/18/2014 05:28 AM, Sheldon wrote:
>>>>> aline, can you try this can works on ubuntu?
>>>>>
>>>>
>>>> No, it does not work on Ubuntu
>>>>
>>>> alinefm at alinefm:~/kimchi$ dpkg --contents
>>>> kimchi-1.1.0-255.gite6cabad.noarch.deb | grep help
>>>> drwxr-xr-x root/root 0 2014-02-18 09:20
>>>> ./usr/share/kimchi/ui/pages/help/
>>>> -rw-r--r-- root/root 2111 2014-02-18 09:20
>>>> ./usr/share/kimchi/ui/pages/help/*.html
>>>>
>>>>
>>>> alinefm at alinefm:~/kimchi$ ls ui/pages/help/
>>>> dita-help.xsl guests.dita *.html Makefile Makefile.am
>>>> Makefile.am.orig Makefile.in storage.dita templates.dita
>>>>
>>>> I will add EXTRA_DIST you mentioned on V2.
>>>>
>>>
>>> As remembered by Cristian we don't need the EXTRA_DIST as those
>>> files are not packaged.
>> what do you mean of packaged? RPM package or tar ball?
>>
>> dita files are in git repository, why they should not in tar ball?
>> without EXTRA_DIST, how we can not put these files into tar.gz
>> some times, user just get code by download tar.gz not from git
>> repository.
>> they need integrate source code.
>
> Are you talking about the tar.gz provided in github page?
> The tar.gz contains all files in git repository. We don't need to
> update Makefile to make it works.
>
http://www.gnu.org/software/automake/manual/automake.html#Basics-of-Distribution
usually we will make the tar.gz "$ make dist"
http://www.shlomifish.org/lecture/Autotools/slides/Makefile_am/extra_dist.html
The EXTRA_DIST argument holds a list of all the files that are part of
the package, but are not installed by default and were not specified in
any other way.
>>>
>>>>> On 02/18/2014 04:26 PM, shaohef at linux.vnet.ibm.com wrote:
>>>>>> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>>>>>>
>>>>>> To get the help html files dinamically the Makefile was using the
>>>>>> following code:
>>>>>>
>>>>>> DITA_HTML_FILES = $(patsubst %.dita,%.html,$(wildcard *.dita))
>>>>>> $(wildcard *.html)
>>>>>>
>>>>>> But it does not well while building deb packages as it cointans
>>>>>> duplicated values:
>>>>>>
>>>>>> /bin/mkdir -p '/tmp/tmp.86vGERYO70/usr/share/kimchi/ui/pages/help'
>>>>>> /usr/bin/install -c -m 644 guests.html storage.html templates.html
>>>>>> guests.html index.html storage.html templates.html
>>>>>> '/tmp/tmp.86vGERYO70/usr/share/kimchi/ui/pages/help'
>>>>>> /usr/bin/install: will not overwrite just-created
>>>>>> `/tmp/tmp.86vGERYO70/usr/share/kimchi/ui/pages/help/guests.html'
>>>>>> with
>>>>>> `guests.html'
>>>>>> (...)
>>>>>>
>>>>>> Fix it.
>>>>>> Add *.html to HTML_FILES directly.
>>>>>>
>>>>>> Also add *.dita and dita-help.xsl to the EXTRA_DIST list.
>>>>>>
>>>>>> Signed-off-by: Aline Manera <alinefm at br.ibm.com>
>>>>>> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>>>>>> ---
>>>>>> ui/pages/help/Makefile.am | 14 +++++++++++---
>>>>>> 1 file changed, 11 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/ui/pages/help/Makefile.am b/ui/pages/help/Makefile.am
>>>>>> index 61ea209..772917c 100644
>>>>>> --- a/ui/pages/help/Makefile.am
>>>>>> +++ b/ui/pages/help/Makefile.am
>>>>>> @@ -17,12 +17,20 @@
>>>>>> # License along with this library; if not, write to the Free
>>>>>> Software
>>>>>> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>>>>>> 02110-1301 USA
>>>>>>
>>>>>> -DITA_HTML_FILES = $(patsubst %.dita,%.html,$(wildcard *.dita))
>>>>>> $(wildcard *.html)
>>>>>> +helpdir = $(datadir)/kimchi/ui/pages/help
>>>>>> +
>>>>>> DITA_XSL_FILE = dita-help.xsl
>>>>>>
>>>>>> -helpdir = $(datadir)/kimchi/ui/pages/help
>>>>>> +HTML_FILES = *.html
>>>>>> +
>>>>>> +DITA_FILES = *.dita
>>>>>> +
>>>>>> +EXTRA_DIST = \
>>>>>> + $(DITA_XSL_FILE) \
>>>>>> + $(DITA_FILES) \
>>>>>> + $(NULL)
>>>>>>
>>>>>> -dist_help_DATA = $(DITA_HTML_FILES) $(NULL)
>>>>>> +dist_help_DATA = $(HTML_FILES) $(NULL)
>>>>>>
>>>>>> %.html: %.dita $(DITA_XSL_FILE)
>>>>>> xsltproc -o $@ $(DITA_XSL_FILE) $<
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Kimchi-devel mailing list
>>>> Kimchi-devel at ovirt.org
>>>> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center
More information about the Kimchi-devel
mailing list