Re: On file installation

2012-05-17 Thread Fernando Apesteguía
On Tue, May 15, 2012 at 9:11 PM, Fernando Apesteguía
fernando.apesteg...@gmail.com wrote:
 On Tue, May 15, 2012 at 7:29 PM, Chris Rees cr...@freebsd.org wrote:
 On 15 May 2012 18:14, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:
 On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:
 On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to 
 proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

 You can use find primaries with COPYTREE_SHARE such as;

 (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
 ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
 \*.bat

 Thanks! I think that is what I was looking for :)

 Sorry guys, but I think I need more help :). I tried with the following 
 line:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name \*.exe )

 but it doesn't seem to follow primaries and it still installs the .exe
 files. I just tried with:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )

 and check that effectively the file is not installed so I suppose this
 has something to do with quoting and escaping special characters (the
 asterisk). I found the following line in audio/xmp/Makefile:

 ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                -or -name *.bak -or -name *.orig )' )

 that seems pretty close to what I'm trying to do, so I tried with this:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )

 but then, the asterisk is expanded and find fails:

 find: JDownloader.exe: unknown primary or operator

 what am I doing wrong?

 Escape the *;

 (cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* ${PREFIX}/${PORTNAME}/
  '! ( -name \*.exe )' )

 That executes the following:

 (cd /usr/home/fernape/porting/jdownloader/port/work/JDownloader 
 /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1
/dev/null  21)   /usr/sbin/chown -R root:wheel $1 
 /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; 
 /usr/bin/find -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \*
 /usr/local/jdownloader/ '! ( -name \*.exe )' )

 which results in:

 $ ls /usr/local/jdownloader

 JDUpdate.exe           JDownloaderBETA.exe    jd/
 license.txt            outdated.dat           tools/
 windows_restore.bat
 JDownloader.exe        JDownloaderD3D.exe     jdupdate.jar
 license_german.txt     plugins/               version.txt
 JDownloader.jar        java/                  libs/
 licenses/              tmp/                   windows_createlog.bat

 The .exe files are still there.

Sorry or my insistence :)

This is what I have in my Makefile:

( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* \
  ${PREFIX}/${PORTNAME} '! ( -name *.exe -or -name 
*.dll \
  -or -name *.bat )' )

what I've observed is that 'make install' fails with this message:

find: JDownloader.exe: unknown primary or operator
find: JDownloader.exe: unknown primary or operator

However, if I replace the expression so I filter with something like
*.txt and there is only
one file in the directory, it works. I checked this with audio/xmp

$cat Makefile
...
.if !defined(NOPORTDOCS)
${ECHO_MSG} Installing documentation in ${DOCSDIR}
( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
-or -name *.bak -or -name *.orig )' )
.endif

...

$ make

$ ls work/xmp-3.5.0/docs/*.bak
work/xmp-3.5.0/docs/xmp.1.bak

Only one file (make install works fine).

$ touch work/xmp-3.5.0/docs/test.bak

$make install

===  Installing for xmp-3.5.0,1
===   xmp-3.5.0,1 depends on file: /usr/local/bin/unzip - found
===   Generating temporary packing list
===  Checking if audio/xmp already installed
Installing xmp in /usr/local/bin
Installing xmp.conf in /usr/local/etc/xmp

Re: On file installation

2012-05-17 Thread Chris Rees
On 17 May 2012 20:58, Fernando Apesteguía fernando.apesteg...@gmail.com wrote:
 On Tue, May 15, 2012 at 9:11 PM, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:
 On Tue, May 15, 2012 at 7:29 PM, Chris Rees cr...@freebsd.org wrote:
 On 15 May 2012 18:14, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:
 On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:
 On 14 May 2012 18:23, Fernando Apesteguía 
 fernando.apesteg...@gmail.com wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to 
 proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

 You can use find primaries with COPYTREE_SHARE such as;

 (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
 ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
 \*.bat

 Thanks! I think that is what I was looking for :)

 Sorry guys, but I think I need more help :). I tried with the following 
 line:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name \*.exe )

 but it doesn't seem to follow primaries and it still installs the .exe
 files. I just tried with:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )

 and check that effectively the file is not installed so I suppose this
 has something to do with quoting and escaping special characters (the
 asterisk). I found the following line in audio/xmp/Makefile:

 ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                -or -name *.bak -or -name *.orig )' )

 that seems pretty close to what I'm trying to do, so I tried with this:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )

 but then, the asterisk is expanded and find fails:

 find: JDownloader.exe: unknown primary or operator

 what am I doing wrong?

 Escape the *;

 (cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* ${PREFIX}/${PORTNAME}/
  '! ( -name \*.exe )' )

 That executes the following:

 (cd /usr/home/fernape/porting/jdownloader/port/work/JDownloader 
 /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1
/dev/null  21)   /usr/sbin/chown -R root:wheel $1 
 /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; 
 /usr/bin/find -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \*
 /usr/local/jdownloader/ '! ( -name \*.exe )' )

 which results in:

 $ ls /usr/local/jdownloader

 JDUpdate.exe           JDownloaderBETA.exe    jd/
 license.txt            outdated.dat           tools/
 windows_restore.bat
 JDownloader.exe        JDownloaderD3D.exe     jdupdate.jar
 license_german.txt     plugins/               version.txt
 JDownloader.jar        java/                  libs/
 licenses/              tmp/                   windows_createlog.bat

 The .exe files are still there.

 Sorry or my insistence :)

 This is what I have in my Makefile:

        ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* \
                          ${PREFIX}/${PORTNAME} '! ( -name *.exe -or -name 
 *.dll \
                                                  -or -name *.bat )' )

 what I've observed is that 'make install' fails with this message:

 find: JDownloader.exe: unknown primary or operator
 find: JDownloader.exe: unknown primary or operator

 However, if I replace the expression so I filter with something like
 *.txt and there is only
 one file in the directory, it works. I checked this with audio/xmp

 $cat Makefile
 ...
 .if !defined(NOPORTDOCS)
        ${ECHO_MSG} Installing documentation in ${DOCSDIR}
        ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                -or -name *.bak -or -name *.orig )' )
 .endif

 ...

 $ make

 $ ls work/xmp-3.5.0/docs/*.bak
 work/xmp-3.5.0/docs/xmp.1.bak

 Only one file (make install works fine).

 $ touch work/xmp-3.5.0/docs/test.bak

 $make install

 ===  Installing for xmp-3.5.0,1
 ===   xmp-3.5.0,1 depends on file: /usr/local/bin/unzip - found
 ===   Generating temporary packing list
 ===  Checking if 

Re: On file installation

2012-05-17 Thread Fernando Apesteguía
El 17/05/2012 22:29, Chris Rees cr...@freebsd.org escribió:

 On 17 May 2012 20:58, Fernando Apesteguía fernando.apesteg...@gmail.com
wrote:
  On Tue, May 15, 2012 at 9:11 PM, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  On Tue, May 15, 2012 at 7:29 PM, Chris Rees cr...@freebsd.org wrote:
  On 15 May 2012 18:14, Fernando Apesteguía 
fernando.apesteg...@gmail.com wrote:
  On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org
wrote:
  On 14 May 2012 18:23, Fernando Apesteguía 
fernando.apesteg...@gmail.com wrote:
  Hi,
 
  I'm working on a port for an application written in Java and I'm
  having some problems deciding how to install the application.
  Previous to the installation, the WRKSRC directory contains some
.jar
  files and some directories along with some .txt files for
  licenses, but also some .exe and .bat files _which I don't want to
  install_. It is basically a package that contains both files for
  windows and non-windows systems.
 
  I was thinking on using COPYTREE_SHARE to install everything and
then
  remove the non necessary files, but doesn't look like
  an elegant solution. Also, I wouldn't like to explicitly specify
every
  one of the files I want to copy. Is there a way of using something
  similar to bash's extglob so I can copy !(*.exe|*bat)? If not,
how to proceed?
 
  I already looked at the existent ports to find something similar
but
  it seems hard to find. I also had a look at bsd.port.mk but
  I couldn't find what I'm looking for.
 
  You can use find primaries with COPYTREE_SHARE such as;
 
  (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
  ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not
-name
  \*.bat
 
  Thanks! I think that is what I was looking for :)
 
  Sorry guys, but I think I need more help :). I tried with the
following line:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ ! -name \*.exe )
 
  but it doesn't seem to follow primaries and it still installs the
.exe
  files. I just tried with:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )
 
  and check that effectively the file is not installed so I suppose
this
  has something to do with quoting and escaping special characters (the
  asterisk). I found the following line in audio/xmp/Makefile:
 
  ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
 ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
 -or -name *.bak -or -name *.orig )' )
 
  that seems pretty close to what I'm trying to do, so I tried with
this:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )
 
  but then, the asterisk is expanded and find fails:
 
  find: JDownloader.exe: unknown primary or operator
 
  what am I doing wrong?
 
  Escape the *;
 
  (cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
${PREFIX}/${PORTNAME}/
   '! ( -name \*.exe )' )
 
  That executes the following:
 
  (cd /usr/home/fernape/porting/jdownloader/port/work/JDownloader 
  /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1
 /dev/null  21)   /usr/sbin/chown -R root:wheel $1 
  /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; 
  /usr/bin/find -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \*
  /usr/local/jdownloader/ '! ( -name \*.exe )' )
 
  which results in:
 
  $ ls /usr/local/jdownloader
 
  JDUpdate.exe   JDownloaderBETA.exejd/
  license.txtoutdated.dat   tools/
  windows_restore.bat
  JDownloader.exeJDownloaderD3D.exe jdupdate.jar
  license_german.txt plugins/   version.txt
  JDownloader.jarjava/  libs/
  licenses/  tmp/   windows_createlog.bat
 
  The .exe files are still there.
 
  Sorry or my insistence :)
 
  This is what I have in my Makefile:
 
 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* \
   ${PREFIX}/${PORTNAME} '! ( -name *.exe -or
-name *.dll \
   -or -name *.bat )' )
 
  what I've observed is that 'make install' fails with this message:
 
  find: JDownloader.exe: unknown primary or operator
  find: JDownloader.exe: unknown primary or operator
 
  However, if I replace the expression so I filter with something like
  *.txt and there is only
  one file in the directory, it works. I checked this with audio/xmp
 
  $cat Makefile
  ...
  .if !defined(NOPORTDOCS)
 ${ECHO_MSG} Installing documentation in ${DOCSDIR}
 ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
 ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
 -or -name *.bak -or -name *.orig )' )
  .endif
 
  ...
 
  $ make
 
  $ ls work/xmp-3.5.0/docs/*.bak
  work/xmp-3.5.0/docs/xmp.1.bak
 
  Only one file (make install works fine).
 
  $ touch 

Re: On file installation

2012-05-17 Thread Chris Rees
On 17 May 2012 22:30, Fernando Apesteguía fernando.apesteg...@gmail.com wrote:

 El 17/05/2012 22:29, Chris Rees cr...@freebsd.org escribió:

 On 17 May 2012 20:58, Fernando Apesteguía fernando.apesteg...@gmail.com
 wrote:
  On Tue, May 15, 2012 at 9:11 PM, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  On Tue, May 15, 2012 at 7:29 PM, Chris Rees cr...@freebsd.org wrote:
  On 15 May 2012 18:14, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org
  wrote:
  On 14 May 2012 18:23, Fernando Apesteguía
  fernando.apesteg...@gmail.com wrote:
  Hi,
 
  I'm working on a port for an application written in Java and I'm
  having some problems deciding how to install the application.
  Previous to the installation, the WRKSRC directory contains some
  .jar
  files and some directories along with some .txt files for
  licenses, but also some .exe and .bat files _which I don't want to
  install_. It is basically a package that contains both files for
  windows and non-windows systems.
 
  I was thinking on using COPYTREE_SHARE to install everything and
  then
  remove the non necessary files, but doesn't look like
  an elegant solution. Also, I wouldn't like to explicitly specify
  every
  one of the files I want to copy. Is there a way of using something
  similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how
  to proceed?
 
  I already looked at the existent ports to find something similar
  but
  it seems hard to find. I also had a look at bsd.port.mk but
  I couldn't find what I'm looking for.
 
  You can use find primaries with COPYTREE_SHARE such as;
 
  (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
  ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not
  -name
  \*.bat
 
  Thanks! I think that is what I was looking for :)
 
  Sorry guys, but I think I need more help :). I tried with the
  following line:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ ! -name \*.exe )
 
  but it doesn't seem to follow primaries and it still installs the
  .exe
  files. I just tried with:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )
 
  and check that effectively the file is not installed so I suppose
  this
  has something to do with quoting and escaping special characters (the
  asterisk). I found the following line in audio/xmp/Makefile:
 
  ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                 ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                 -or -name *.bak -or -name *.orig )' )
 
  that seems pretty close to what I'm trying to do, so I tried with
  this:
 
  ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )
 
  but then, the asterisk is expanded and find fails:
 
  find: JDownloader.exe: unknown primary or operator
 
  what am I doing wrong?
 
  Escape the *;
 
  (cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
  ${PREFIX}/${PORTNAME}/
   '! ( -name \*.exe )' )
 
  That executes the following:
 
  (cd /usr/home/fernape/porting/jdownloader/port/work/JDownloader 
  /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1
 /dev/null  21)   /usr/sbin/chown -R root:wheel $1 
  /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; 
  /usr/bin/find -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \*
  /usr/local/jdownloader/ '! ( -name \*.exe )' )
 
  which results in:
 
  $ ls /usr/local/jdownloader
 
  JDUpdate.exe           JDownloaderBETA.exe    jd/
  license.txt            outdated.dat           tools/
  windows_restore.bat
  JDownloader.exe        JDownloaderD3D.exe     jdupdate.jar
  license_german.txt     plugins/               version.txt
  JDownloader.jar        java/                  libs/
  licenses/              tmp/                   windows_createlog.bat
 
  The .exe files are still there.
 
  Sorry or my insistence :)
 
  This is what I have in my Makefile:
 
         ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* \
                           ${PREFIX}/${PORTNAME} '! ( -name *.exe -or
  -name *.dll \
                                                   -or -name *.bat )' )
 
  what I've observed is that 'make install' fails with this message:
 
  find: JDownloader.exe: unknown primary or operator
  find: JDownloader.exe: unknown primary or operator
 
  However, if I replace the expression so I filter with something like
  *.txt and there is only
  one file in the directory, it works. I checked this with audio/xmp
 
  $cat Makefile
  ...
  .if !defined(NOPORTDOCS)
         ${ECHO_MSG} Installing documentation in ${DOCSDIR}
         ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                 ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                 -or -name *.bak -or -name *.orig )' )
  .endif
 
  ...
 
  $ make
 
  $ ls work/xmp-3.5.0/docs/*.bak
  

Re: On file installation

2012-05-15 Thread Fernando Apesteguía
On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
fernando.apesteg...@gmail.com wrote:
 On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:
 On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to 
 proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

 You can use find primaries with COPYTREE_SHARE such as;

 (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
 ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
 \*.bat

 Thanks! I think that is what I was looking for :)

Sorry guys, but I think I need more help :). I tried with the following line:

( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
${PREFIX}/${PORTNAME}/ ! -name \*.exe )

but it doesn't seem to follow primaries and it still installs the .exe
files. I just tried with:

( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )

and check that effectively the file is not installed so I suppose this
has something to do with quoting and escaping special characters (the
asterisk). I found the following line in audio/xmp/Makefile:

( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
-or -name *.bak -or -name *.orig )' )

that seems pretty close to what I'm trying to do, so I tried with this:

( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )

but then, the asterisk is expanded and find fails:

find: JDownloader.exe: unknown primary or operator

what am I doing wrong?

Thanks in advance.


 I'll give it a try.


 Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: On file installation

2012-05-15 Thread Chris Rees
On 15 May 2012 18:14, Fernando Apesteguía fernando.apesteg...@gmail.com wrote:
 On Mon, May 14, 2012 at 7:40 PM, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:
 On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:
 On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to 
 proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

 You can use find primaries with COPYTREE_SHARE such as;

 (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
 ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
 \*.bat

 Thanks! I think that is what I was looking for :)

 Sorry guys, but I think I need more help :). I tried with the following line:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name \*.exe )

 but it doesn't seem to follow primaries and it still installs the .exe
 files. I just tried with:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ ! -name JDownloader.exe )

 and check that effectively the file is not installed so I suppose this
 has something to do with quoting and escaping special characters (the
 asterisk). I found the following line in audio/xmp/Makefile:

 ( cd ${WRKSRC}/docs  ${COPYTREE_SHARE} \* \
                ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
                -or -name *.bak -or -name *.orig )' )

 that seems pretty close to what I'm trying to do, so I tried with this:

 ( cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \*
 ${PREFIX}/${PORTNAME}/ '! ( -name *.exe )' )

 but then, the asterisk is expanded and find fails:

 find: JDownloader.exe: unknown primary or operator

 what am I doing wrong?

Escape the *;

(cd ${WRKSRC}/JDownloader  ${COPYTREE_SHARE} \* ${PREFIX}/${PORTNAME}/
 '! ( -name \*.exe )' )

Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


On file installation

2012-05-14 Thread Fernando Apesteguía
Hi,

I'm working on a port for an application written in Java and I'm
having some problems deciding how to install the application.
Previous to the installation, the WRKSRC directory contains some .jar
files and some directories along with some .txt files for
licenses, but also some .exe and .bat files _which I don't want to
install_. It is basically a package that contains both files for
windows and non-windows systems.

I was thinking on using COPYTREE_SHARE to install everything and then
remove the non necessary files, but doesn't look like
an elegant solution. Also, I wouldn't like to explicitly specify every
one of the files I want to copy. Is there a way of using something
similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to proceed?

I already looked at the existent ports to find something similar but
it seems hard to find. I also had a look at bsd.port.mk but
I couldn't find what I'm looking for.

Any help is appreciated, thanks.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: On file installation

2012-05-14 Thread Chris Rees
On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

You can use find primaries with COPYTREE_SHARE such as;

(cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
\*.bat

Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: On file installation

2012-05-14 Thread Fernando Apesteguía
On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:
 On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com 
 wrote:
 Hi,

 I'm working on a port for an application written in Java and I'm
 having some problems deciding how to install the application.
 Previous to the installation, the WRKSRC directory contains some .jar
 files and some directories along with some .txt files for
 licenses, but also some .exe and .bat files _which I don't want to
 install_. It is basically a package that contains both files for
 windows and non-windows systems.

 I was thinking on using COPYTREE_SHARE to install everything and then
 remove the non necessary files, but doesn't look like
 an elegant solution. Also, I wouldn't like to explicitly specify every
 one of the files I want to copy. Is there a way of using something
 similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to 
 proceed?

 I already looked at the existent ports to find something similar but
 it seems hard to find. I also had a look at bsd.port.mk but
 I couldn't find what I'm looking for.

 You can use find primaries with COPYTREE_SHARE such as;

 (cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
 ${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
 \*.bat

Thanks! I think that is what I was looking for :)

I'll give it a try.


 Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: On file installation

2012-05-14 Thread Jason Helfman

On Mon, May 14, 2012 at 07:40:41PM +0200, Fernando Apesteguía thus spake:

On Mon, May 14, 2012 at 7:31 PM, Chris Rees cr...@freebsd.org wrote:

On 14 May 2012 18:23, Fernando Apesteguía fernando.apesteg...@gmail.com wrote:

Hi,

I'm working on a port for an application written in Java and I'm
having some problems deciding how to install the application.
Previous to the installation, the WRKSRC directory contains some .jar
files and some directories along with some .txt files for
licenses, but also some .exe and .bat files _which I don't want to
install_. It is basically a package that contains both files for
windows and non-windows systems.

I was thinking on using COPYTREE_SHARE to install everything and then
remove the non necessary files, but doesn't look like
an elegant solution. Also, I wouldn't like to explicitly specify every
one of the files I want to copy. Is there a way of using something
similar to bash's extglob so I can copy !(*.exe|*bat)? If not, how to proceed?

I already looked at the existent ports to find something similar but
it seems hard to find. I also had a look at bsd.port.mk but
I couldn't find what I'm looking for.


You can use find primaries with COPYTREE_SHARE such as;

(cd ${WRKSRC}/wherever  ${COPYTREE_SHARE} \*
${JAVALIBDIR}/${PORTNAME}/wherever -not -name \*.exe -and -not -name
\*.bat


Thanks! I think that is what I was looking for :)

I'll give it a try.



Chris


Also, if it is trivial, I would suggest building it via source. Please though,
don't install any .war files, as if an application server is involved in the
expansion of the war file with this port, then the system will be dirty on
de-install.

-jgh

--
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org