Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where should Simbody examples be installed? #82

Closed
sherm1 opened this issue Dec 12, 2013 · 11 comments · Fixed by #94
Closed

where should Simbody examples be installed? #82

sherm1 opened this issue Dec 12, 2013 · 11 comments · Fixed by #94

Comments

@sherm1
Copy link
Member

sherm1 commented Dec 12, 2013

This is a follow-on to pr #64.
@j-rivero, @scpeters, @thomas-moulard
The Simbody installation includes some example programs, provided in both source and binary form. On Windows these end up in <SimbodyInstallDir>/examples/{bin,src,...} which is adequate there. However I don't think they are going to the right place on Mac and Linux, where the installed files are spread around rather than being concentrated in a single directory. On Mac they end up in /usr/local/examples/.... I don't know what happens on Linux.

Where should these go? Is there a GnuInstallDirs convention for examples?

@scpeters
Copy link
Member

For reference, the installed examples folder has a bin/ with executable binaries and two folders that contain the C++ source code of the examples. My guess would be to put it somewhere under share/simbody, but I expect there is a policy for it that I don't know about.

@sherm1
Copy link
Member Author

sherm1 commented Dec 13, 2013

Is that on Ubuntu? Where does the examples directory end up?

@scpeters
Copy link
Member

The examples directory ends up at ${CMAKE_INSTALL_PREFIX}/examples and it contains 3 folders:

$ ls examples/
bin  simmath  src

This is both for mac and ubuntu for me. Note that I used homebrew for the mac build:

brew tap osrf/simulation
brew install simbody --HEAD

@sherm1
Copy link
Member Author

sherm1 commented Dec 13, 2013

Does that mean by default on Debian it would end up in /usr/examples? That seems bad! The default on Mac puts it in /usr/local/examples which still seems like the wrong place.

@chrisdembia
Copy link
Member

I'd think it'd go somewhere in /usr/share/simbody.

On Thu, Dec 12, 2013 at 5:19 PM, Michael Sherman
notifications@github.comwrote:

Does that mean by default on Debian it would end up in /usr/examples? That
seems bad! The default on Mac puts it in /usr/local/examples which still
seems like the wrong place.


Reply to this email directly or view it on GitHubhttps://github.com//issues/82#issuecomment-30478877
.

@j-rivero
Copy link
Member

I would say that the usual place is under /usr/share/doc/$package_name/examples. Easy to get using $CMAKE_INSTALL_DOCDIR.

@scpeters
Copy link
Member

Currently the examples aren't installed on Ubuntu due to Jose's configuration of the debian install files.

@thomas-moulard
Copy link

Here is the Debian policy regarding examples:
http://www.debian.org/doc/debian-policy/ch-docs.html#s12.6

12.6 Examples

Any examples (configurations, source files, whatever), should be installed in a directory /usr/share/doc/package/examples. These files should not be referenced by any program: they're there for the benefit of the system administrator and users as documentation only. Architecture-specific example files should be installed in a directory /usr/lib/package/examples with symbolic links to them from /usr/share/doc/package/examples, or the latter directory itself may be a symbolic link to the former.

If the purpose of a package is to provide examples, then the example files may be installed into /usr/share/doc/package.

Please note that sources must be in share whereas binaries should be in lib.

@chrisdembia
Copy link
Member

Can you clarify about your last comment? Compiled examples go in
/usr/lib?

On Thu, Dec 12, 2013 at 5:41 PM, Thomas Moulard notifications@github.comwrote:

Here is the Debian policy regarding examples:
http://www.debian.org/doc/debian-policy/ch-docs.html#s12.6

12.6 Examples

Any examples (configurations, source files, whatever), should be installed in a directory /usr/share/doc/package/examples. These files should not be referenced by any program: they're there for the benefit of the system administrator and users as documentation only. Architecture-specific example files should be installed in a directory /usr/lib/package/examples with symbolic links to them from /usr/share/doc/package/examples, or the latter directory itself may be a symbolic link to the former.

If the purpose of a package is to provide examples, then the example files may be installed into /usr/share/doc/package.

Please note that sources must be in share whereas binaries should be in
lib.


Reply to this email directly or view it on GitHubhttps://github.com//issues/82#issuecomment-30479877
.

@scpeters
Copy link
Member

I think he meant that they go in /usr/lib/simbody/examples, and that that folder is also symlinked to /usr/share/doc/simbody/examples.

@thomas-moulard
Copy link

Yes, exactly. The most important point is: no architecture dependent files in share (i.e. no compiled files).

scpeters added a commit to scpeters/simbody that referenced this issue Dec 24, 2013
Install most of the example files to the doc folder, except on
UNIX, when the executable examples go to a subfolder of lib
with a symbolic link installed to the doc folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants