[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debianization with files that change




My reply is at the bottom.  Please put your reply there too.
On Sat, 11 Jan 2020, David Given wrote:
I'd add that the recommended thing to do if you're trying to create a
package for software you own is to blatantly wear two hats: with one hat
you're the upstream author, and with the other hat you're the packager. Have
two different repositories, don't add the debian/ directory to the upstream
distribution, when you find an upstream bug fix it there and make a release
and then import the new release into the Debian repository and make a new
package, etc. The workflow works much better like that.
In your specific case, this will avoid the git weirdness because you'd be
only using the public dist files on import.

I think I've come up with what may be an ideal solution that lets me put the debian/ directory in the upstream. Please let me know what you think.

deb:
ifneq ($(and $(wildcard $(GIT_DIR)),$(shell which git)),)
        git archive --format=tgz --prefix $(NAME)_$(VERSION).orig/ HEAD -o $(NAME)_$(VERSION).orig.tar.gz
        git archive --format=tar --prefix $(NAME)_$(VERSION).orig/ HEAD | tar xf -
else
        @echo "Not in a git repository or git command not found.  Cannot build a deb this way."
endif
        cd $(NAME)_$(VERSION).orig/ ; dpkg-buildpackage -us -uc

Doing "make deb" will use git-archive(1) to spit out an original tarball and source directory with all the hash additions and such that I mentioned earlier taken care of. Then the build process goes in there and builds a debian package. There are some complaints about useless dependencies and some other targets I want to cover (nosound, dumb and SDL), but this seems to do what I want. Comments please?


--
David Griffith
dave@661.org

A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Reply to: