开发者

Converting a script/program into an installable tarball?

开发者 https://www.devze.com 2022-12-21 03:00 出处:网络
I am quite familiar with writing small programs or scripts, and I am also familiar with downloading a source tarball and installing it using ./configure && make && make install (or, fa

I am quite familiar with writing small programs or scripts, and I am also familiar with downloading a source tarball and installing it using ./configure && make && make install (or, failing that, doing whatever the INSTALL or README files tell me to do). However, I don't know how to take a script that I've written and package it up (along with its supporting files) so that it can be installed as above.

I've tried Googling, but I'm not sure what search terms to use. If I try something involving the word "package," I get guides on how to convert a tarball to a deb/rpm/miscellaneous-distro-specific-package-format, which is not what I want.

I guess I need to use something called a build system, which might be called autotools, unless it's actually cmake, rake, scons, or something else?

Also, if my program requires some supporting files, how might I need to modify my program so that it can locate those files once th开发者_如何学运维ey have been installed in /usr/share, /usr/lib, and wherever else they end up after installation?

Basically, I'm looking to graduate from writing scripts to writing distributable programs.


Answering your question "How do I learn how to use autotools to distribute my program as a tarball?"

http://www.gnu.org/software/autoconf/manual/

http://www.gnu.org/software/automake/manual/ and

http://sources.redhat.com/autobook/ (Outdated but still useful)

0

精彩评论

暂无评论...
验证码 换一张
取 消