[odf-devel] Patch for 'odftools' Makefile
Samuel May
sam.m4y at gmail.com
Sat Feb 7 03:30:36 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Firstly, thanks for the work you guys have done!
I've been packaging odftools-0.1 for the Arch Linux user repository.
The odftools Makefile uses cp and assumes that the $(PREFIX)/bin and
$(PREFIX)/share/man/man1 directories exist, and doesn't work if they
don't. Some package-creation programs (such as Arch Linux's 'makepkg')
require programs to install themselves into an empty fake root
directory,
in my case /home/samwise/ABS/odftools/pkg:
BEGIN CODE
==> Starting build()...
sed "s#{prefix}#/usr#" elinks.conf.in > elinks.conf
sed "s#{prefix}#/usr#" odfread.in > odfread
sed "s#{prefix}#/usr#" odf2html.in > odf2html
chmod +x odfread odf2html
pod2man odfread.in > doc/odfread.1
pod2man odf2html.in > doc/odf2html.1
mkdir -p /home/samwise/ABS/odftools/pkg/usr/share/odftools
cp odfread /home/samwise/ABS/odftools/pkg/usr/bin/
cp: cannot create regular file
`/home/samwise/ABS/odftools/pkg/usr/bin/': Is a directory
make: *** [install] Error 1
==> ERROR: Build Failed.
Aborting...
END CODE
This patch changes the Makefile to use the unix 'install' program
instead of 'cp' and be more robust when installing in possibly empty
root directories:
BEGIN CODE
- --- Makefile 2006-08-25 01:29:30.000000000 +1000
+++ Makefile.arch 2009-02-07 18:26:15.000000000 +1100
@@ -15,14 +15,10 @@
pod2man odf2html.in > doc/odf2html.1
install:
- - mkdir -p $(PREFIX)/share/$(PACKAGE)
- - cp odfread $(PREFIX)/bin/
- - cp odf2html $(PREFIX)/bin/
- - cp elinks.conf $(PREFIX)/share/$(PACKAGE)/
- - cp odt2html.xsl $(PREFIX)/share/$(PACKAGE)/
- - cp odt2html-fast.xsl $(PREFIX)/share/$(PACKAGE)/
- - cp doc/odfread.1 $(PREFIX)/share/man/man1/
- - cp doc/odf2html.1 $(PREFIX)/share/man/man1/
+ install -m 755 -d $(PREFIX)/bin $(PREFIX)/share/$(PACKAGE)
$(PREFIX)/share/man/man1
+ install -m 755 -t $(PREFIX)/bin odfread odf2html
+ install -m 644 -t $(PREFIX)/share/$(PACKAGE) elinks.conf
odt2html.xsl odt2html-fast.xsl
+ install -m 644 -t $(PREFIX)/share/man/man1/ doc/odfread.1 doc/odf2html.1
clean:
rm odfread odf2html elinks.conf
END CODE
Sam May
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.2)
iEYEARECAAYFAkmNRqsACgkQ0rKcFLvKbFrOzQCfVSzwb2c7gn0pA+OAIzBorSHe
7ssAn2i/JMiSYtauLxsJ9aJN6m71Pt3t
=lzIc
-----END PGP SIGNATURE-----
More information about the odf-devel
mailing list