{"id":1021,"date":"2013-01-02T11:56:02","date_gmt":"2013-01-02T11:56:02","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=1021"},"modified":"2013-01-02T13:34:00","modified_gmt":"2013-01-02T13:34:00","slug":"building-a-debian-package-for-gromacs-4-0-5-under-ubuntu-12-04","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2013\/01\/building-a-debian-package-for-gromacs-4-0-5-under-ubuntu-12-04\/","title":{"rendered":"Building a debian package for gromacs 4.0.5 under Ubuntu 12.04"},"content":{"rendered":"<p>I based my build on <a href=\"http:\/\/wiki.debian.org\/IntroDebianPackaging\">this<\/a> set of instructions. These notes are mostly to remind me what I had to do to build this particular package, and the issues I ran into. There maybe omissions, this is mostly from memory.<\/p>\n<p>gromacs itself seems to contain a half working deb package build system, with some missing files. There is a debian package for the current version of gromacs (4.5.5 IIRC), it might be better to take the debian config files from this. The configuration file below also added a suffix to gromacs commands, so both 4.5.5 and 4.0.5 can be installed concurrently.<\/p>\n<p>0. Do not do this on an NFS drive with root squashing, install tries to change the file ownership to root and breaks. Install build-essentials and a bunch of other things (see above URL).<br \/>\n1. Rename the gromacs tarball to gromacs_4.0.5.orig.tar.gz<br \/>\n2. Untar it (tar -xvf gromacs_4.0.5.orig.tar.gz).<br \/>\n3. cd gromacs-4.0.5<br \/>\n4. mkdir debian<br \/>\n5. mkdir debian\/source<br \/>\n6. touch debian\/copyright<br \/>\n7. Create debian\/compat, should contain the single number 8.<br \/>\n8. Use the following to create a changelog:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ndch --create -v 4.0.5-1 --package gromacs405\r\n<\/pre>\n<p>9. Create a file debian\/rules with the following contents (this is a makefile, spaces at the start of lines need to be tab characters):<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#!\/usr\/bin\/make -f\r\n%:\r\n        dh $@\r\n\r\noverride_dh_auto_configure:\r\n        dh_auto_configure -- --program-suffix=405 --prefix=\/usr --docdir=\/usr\/share\/gromacs405 --includedir=\/usr\/include\/gromacs405 --htmldir=\/usr\/share\/gromacs405 --datadir=\/usr\/share\/gromacs405 --enable-static=no --libdir=\/usr\/lib\/gromacs405\r\n\r\noverride_dh_auto_install:\r\n        $(MAKE) DESTDIR=$$(pwd)\/debian\/gromacs405 install\r\n\r\noverride_dh_install:\r\n        sed -i &quot;\/dependency_libs\/ s\/'.*'\/''\/&quot; `find . -name '*.la'`\r\n        dh_install\r\n<\/pre>\n<p>10. Create a file debian\/source\/format with the following contents:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n3.0 (quilt)\r\n<\/pre>\n<p>11. Run this to build everything:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndebuild -us -uc\r\n<\/pre>\n<p>12. Your deb should be built.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I based my build on this set of instructions. These notes are mostly to remind me what I had to do to build this particular package, and the issues I ran into. There maybe omissions, this is mostly from memory. gromacs itself seems to contain a half working deb package build system, with some missing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-gt","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":2,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}