]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn
I am bad at formatting.
[ikiwiki.git] / doc / bugs / Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn
1 Currently ikiwiki uses cp(1) with GNU extensions in Makefile.PL for installing files, thus causing problems on FreeBSD which doesn't have a cp(1) with GNU extensions in the base system.
2
3 Here is a patch against ikiwiki-1.51 for using find(1) and install(1) instead of cp(1).
4
5     --- Makefile.PL.orig        Sun Apr 29 12:57:51 2007
6     +++ Makefile.PL     Sun Apr 29 13:08:38 2007
7     @@ -47,8 +47,12 @@ extra_clean:
8      
9      extra_install:
10         install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
11     -   find basewiki templates \( -type f -or -type l \) ! -regex '.*\.svn.*' \
12     -           -exec cp --parents -aL {} $(DESTDIR)$(PREFIX)/share/ikiwiki \;
13     +   for dir in `find -L basewiki templates -type d ! -regex '.*\.svn.*'`; do \
14     +           install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
15     +           for file in `find -L $$dir -maxdepth 1 -type f`; do \
16     +                   install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
17     +           done; \
18     +   done
19      
20         install -d $(DESTDIR)$(PREFIX)/share/man/man1
21         install -m 644 ikiwiki.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki.1
22
23 > Couldn't it just use install -D ? --[[Joey]]
24
25 >> No, apparently FreeBSD `install` does not support `-D`.  See [the FreeBSD install manpage](http://www.freebsd.org/cgi/man.cgi?query=install&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html). --[[JoshTriplett]]
26
27 >> Patch applied; [[done]]. --[[JoshTriplett]]
28
29 There are still/again "cp -a"s in the Makefile as of 3.00
30
31 > It's a cp -a || install. Is that causing you a problem somehow?
32 > --[[Joey]]