I've looked into ebuild installing C::B in Gentoo Linux
http://forums.codeblocks.org/index.php/topic,810.0.html.
Here's what I've found:
# Code::Blocks has a funny install procedure that puts all of its
# executables and libraries inside a single directory structure. This may be
# useful for installation on Windows, but does not follow FHS standards on
# linux. The following patch modifies the code to read the plugins and data
# from the proper paths.
# Code::Blocks has an odd makefile. This patch also makes it accept the user's
# CXXFLAGS
epatch ${FILESDIR}/${P}.patch
And one more peace of code:
# And now the screwy Code::Blocks installation. It is built around a windows
# install model where all executables, data, and libraries are under a
# program's directory. We need to run the install script which will
# "install" to ${S}/src/ouput and then manually move everything to ${D} in
# the proper FHS paths
cd ${S}/src
. update
# install the icon
cd ${S}/src/src/resources/icons
insinto /usr/share/pixmaps
newins app_64.xpm codeblocks.xpm
# fixup permissions and move files from src/output to their proper places in
# ${D}
cd ${S}/src/output
# rename the main executable to something less windows-ish
newbin codeblocks.exe codeblocks
dobin console_runner.exe
dolib.so libcodeblocks.so
# tips.txt belongs in share
insinto /usr/share/${PN}
doins tips.txt
cd share/CodeBlocks
# now setup /usr/share/codeblocks and move the data files there
doins -r *.zip images/ templates/ lexers/
# move the plugin libraries out of this "share"
insopts -m0755
insinto /usr/lib/${PN}
doins -r plugins/
insopts -m0644
# and the docs
cd ${S}/src
dodoc AUTHORS BUGS COMPILERS ChangeLog README TODO
# and lastly, the desktop entry
make_desktop_entry codeblocks "Code::Blocks IDE" "codeblocks.xpm" \
"Development"
And as I see it install C::B just like any other app under Linux copying all resources into default system directories - there's no need for any running script (but unfortunately will allow only one C::B version to be installed at once). Maybe some UNIX-like installer should be added ?