Dear devs,
I've noticed that r.green module is installing his libraries in the wrong place:
{{{
$ # rm -r $GRASS_ADDON_BASE
$ g.extension extension=r.green
Fetching <r.green> from GRASS GIS Addons repository (be patient)...
Compiling...
Installing...
Updating addons metadata file...
ERROR: Unable to read manual page: [Errno 2] No such file or directory:
'/home/pietro/.grass7/addons/docs/html/r.green.html'
}}}
that generate a tree directory like:
{{{
$ tree $GRASS_ADDON_BASE
/home/pietro/.grass7/addons
├── bin
├── docs
│ ├── html
│ │ ├── grassdocs.css
│ │ ├── r.green.biomassfor.co2.html
│ │ └── ...
│ ├── man
│ │ └── man1
│ │ ├── r.green.biomassfor.co2.1
│ │ ├── r.green.biomassfor.economic.1
│ │ └── ...
│ └── rest
├── etc
├── libgreen
│ ├── checkparameter.py
│ └── ...
├── libhydro
│ ├── basin.py
│ └── ...
├── modules.xml
└── scripts
├── r.green.biomassfor.co2
├── r.green.biomassfor.economic
└── ...
}}}
I would like that both the directories: libgreen and libhydro are
installed inside $GRASS_ADDON_BASE/etc/r.green:
{{{
$ tree $GRASS_ADDON_BASE
/home/pietro/.grass7/addons
├── bin
├── docs
│ ├── html
│ │ ├── grassdocs.css
│ │ ├── r.green.biomassfor.co2.html
│ │ └── ...
│ ├── man
│ │ └── man1
│ │ ├── r.green.biomassfor.co2.1
│ │ ├── r.green.biomassfor.economic.1
│ │ └── ...
│ └── rest
├── etc
│ └── r.green
│ ├── libgreen
│ │ ├── checkparameter.py
│ │ └── ...
│ └──libhydro
│ ├── basin.py
│ └── ...
├── modules.xml
└── scripts
├── r.green.biomassfor.co2
├── r.green.biomassfor.economic
└── ...
}}}
I think the problem is due that when in the Makefile I create the
ETCDIR the LIBGREENDIR does not exist yet:
https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.green/libgreen/Makefile#L18
Therefore I've tried adding to the Makefile something like:
{{{
$ svn diff libgreen/Makefile
Index: libgreen/Makefile
--- libgreen/Makefile (revision 65945)
+++ libgreen/Makefile (working copy)
@@ -15,6 +15,9 @@
default: $(PYFILES) $(PYCFILES) $(ETCDIR)/__init__.py $(ETCDIR)/__init__.pyc
+$(LIBGREENDIR):
+ $(MKDIR) $@
+
$(ETCDIR):
$(MKDIR) $@
}}}
But it continue to install libgreen and libhydro in the
$GRASS_ADDONS_BASE root...
NOTE: if I compile the module with: make MODULE_TOPDIR=$GISBASE both
the directories are created in the correct place:
{{{
$ ls -l $GISBASE/etc/r.green
total 8.0K
drwxr-xr-x 2 pietro pietro 4.0K Aug 17 12:52 libgreen/
drwxr-xr-x 2 pietro pietro 4.0K Aug 17 12:52 libhydro/
}}}
Why?
Someone has an idea on how I could/should fix this?
Pietro