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

Re: RFS: wmaker (try 2)



On 12/30/2011 05:36 PM, Scott Howard wrote:
Hello Rodolfo and Paul,

Please CC me to replies. I just did a QA upload to fix an RC bug in
wmaker, I didn't see that you were already working on it (otherwise I
could have just worked with you!)

I saw Paul's given helpful advice on the package, I wanted to add some
comments about d/rules (haven't really looked at anything else):

d/rules:
Paul was right in trying to squash it down smaller. The goal is to
deviate from the simple "dh" as little as necessary, making it easier
for long term maintenance. Here are some comments:

(1) The follow section is pretty much unnecessary:
{snip}
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -DDEBUG
endif

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
export DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	HOSTSPEC := --build $(DEB_HOST_GNU_TYPE)
else
	HOSTSPEC := --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
{end snip}

the dh command will parse DEB_BUILD_OPTIONS, so you don't need to
explicitly define the CFLAGS for noopt and debug. Also, I'm not too
familiar with this package, but is there any reason why you want to
explicitly set DEB_BUILD and DEB_HOST types in debian/rules? Why not
just let configure do it's job (is there a reason why you wouldn't?)
or let users set it on their own before building?

(2) If you really want to make debian/rules shorter, do you really
need to define all the path variables? Would ./configure --prefix=/usr
pretty much take care of it for you? Only set the variables you really
need, it makes figuring out what is important and unique to your
package much easier.

(3)
{snip}
override_dh_auto_configure:
	./autogen.sh
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) \
	$(WMAKER_OPTIONS) CFLAGS="$(CFLAGS)"
{end snip}

this is bad Makefile form, you need tabs before the ifneq/endif/ifneq,
otherwise make doesn't think it is part of the auto_configure override
and just part of the script. Instead of this, consider using:

{snip}
%:
	dh $@ --with autotools-dev
{end snip}

and change your override:
{snip}
override_dh_auto_configure:
	./autogen.sh
	LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) \
	$(WMAKER_OPTIONS) CFLAGS="$(CFLAGS)"
{end snip}


(4) You can entirely delete your clean override, and instead make a
file debian/clean with the content "WindowMaker/Defaults/WMRootMenu"
as in:
$ echo WindowMaker/Defaults/WMRootMenu>  debian/clean
However, since debian/ is quite busy, this is optional

(5) I believe you are parallel build safe, so you can do:
{snip}
%:
	dh $@ --parallel --with autotools-dev
{end snip}
optional, of course, since it doesn't take too long to build.


(6) It is extremely strongly suggested to use a VCS. I prefer git,
with "git-import-orig --pristine-tar" creating everything a developer
needs to recreate the entire pristine source package from a cloned git
repo. Right now, you can just do a "git-import-dsc --pristine-tar" to
import the package you already have. See [1], and if you want to use
the collab-maint group on alioth you can apply for membership.

Again, please CC me to replies, and thank you for your work!
~Scott


[1] http://wiki.debian.org/PackagingWithGit


Hi Scott!,

thanks a lot for you reply. Your mail makes me the day. I am soooo happy.

I put some days ago a new version at mentors. The file debian/rules is now shorter, and I move a lot of stuff to debian/ specific files (install, postrm,...).

Please, if you have one minute, take a look this new upload. Send us the comments and I will create a new debian/changelog file (and of course, include your comments).

About this mail, with the comments of Jakub:

About 1: I don't know what to do. I can maintain the current code or change to new debhelper and compat. About 2: Yes, I know that. I changed it in the last upload. Now are only three lines and two are commented.
About 3: Jakub sent a comment about it. What should I do?
About 4: Yes, debian folder has a lot of files. I moved some of them to one directory in the last upload. I leave it here because I sent a patch to the wmaker-crm upstream (http://lists.windowmaker.org/dev/msg02488.html), but is not applied yet.
About 5: Perfect. I will update the next version
About 6: The debian folder is included in the upstream, because is used to make the nigthly packages. I am not sending the changes to the upstream yet to avoid disturb the mail list. I am waiting to upload the package to debian, and then send only one patch to the upstream.

Thanks a lot for your help and comments.

Best Regards,

kix.


Reply to: