Bug#436450: mol: take part at pkg-mol

2007-08-12 Thread Jörg Sommer
Jörg Sommer schrieb am Sun 12. Aug, 13:55 (+0200):
> # add the Debian directory and the top-level Makefile
>   cp -pr debian/debian.mol-source modules/mol/debian
>   #sed -i 's/MOL_VERSION/$(VERSION)/; q' modules/mol/debian/changelog.m4
>   sed 's/MOL_VERSION/$(VERSION)/; q' < modules/mol/debian/changelog.m4.m4 
> \

Please change these lines above to

#sed -i '1s/MOL_VERSION/$(VERSION)/' modules/mol/debian/changelog.m4
sed '1s/MOL_VERSION/$(VERSION)/' < modules/mol/debian/changelog.m4.m4 \

Bye, Jörg.
-- 
“Science is the game we play with God to find out what his rules are.”


pgpOZ6NHrU6J9.pgp
Description: PGP signature


Bug#436450: mol: take part at pkg-mol

2007-08-12 Thread Jörg Sommer
Hi Gaudenz,

I would like to take part in pkg-mol. My alioth account is jo-guest.

At first a new rules files. It's much more cleaner and fixes the problem
with building twice in a row. Now the directory looks the same before and
after building.

The changes:
• Added -g to the CFLAGS because policy section 10.1 suggests to build
  with debugging symbols and strip them later

• Added support for DEB_BUILD_OPTIONS=noopt as suggested by policy
  section 10.1.

• Rearranged the targets in the file: clean, build, binary.

• clean:
  · Removed the dh_testroot. clean doesn't need root previleges.

  · Put the unpatch target into the command sequence, because it's more
intuitive.

  · Removed debian/tmp from the dh_clean call. It's not needed.

  · Call “dpatch apply Makefile” before running make distclean, because
it fails due to the missing bootx directory.

• Merged the configure and the build targets.

• Use make defconf instead of yes '' | make conf to create the
  configuration.

• binary-arch:
  · Added a -a to every dh_* call, because we build the arch specific
packages.

  · No need to fix manually the permission of mol.symbols

  · Replaced the m4 call by an sed call. This saves a build dependency.
The file should get renamed, because sed can edit inplace.

• Added the get-orig-source target that fetches the upstream tar.bz2 and
  creates the .orig.tar.gz. This is what policy suggests in section 4.9.

Other things:
• I suggest to rename debian/debian.mol-source/changelog.m4.m4 to
  changelog.m4 as said above.

• Remove m4 from the build dependencies.

• Remove debian/mol-source.dirs. It's not needed.

• Fix the lintian warning about the menu file. -> mol.menu.patch

• Strip down debian/mol.dirs. Is /var/state/mol really used?
  -> mol.dirs.patch

• Fix #412756 -> Makefile.mol-source.patch

• Why is a ~ in the version? ~ is a special character. I would use +

• Did upstream refuse to include the manpages?

• Does upstream know the problem with the buggy distclean, i.e. it
  doesn't remove all files and it runs configure.

• Why does upstream ignore the values (e.g. --datadir) passed to
  configure?

• Why does upstream build the configuration interface if defconf is used?

• lintian complains about hyphen-used-as-minus-sign in manpages.

• The copyright files is not up to date.

Schöne Grüße, Jörg.
-- 
Ein Narr, er sieht die Weisheit nicht,
selbst wenn sie närrisch zu ihm spricht.
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess. 

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# include dpatch rules
include /usr/share/dpatch/dpatch.make

# the values from configure aren't used by the Makefile so we have to pass
# them to every make call
DEBIANFLAGS=prefix=/usr datadir=/usr/share/mol libdir=/usr/lib/mol \
  docdir=/usr/share/doc/mol

CFLAGS += -g -D_FILE_OFFSET_BITS=64

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

# Debian package version
VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d " " -f 2)
UPSTREAM_VERSION=$(shell echo $(VERSION) | sed s/~dfsg.*//)

clean:
dh_testdir
dh_clean
rm -f build-stamp

# remove the manpages
rm -f debian/*.[17] mol.tar.bz2

dpatch apply Makefile
$(MAKE) distclean

# upstream bug: distclean does not remove these files
rm -rf obj-ppc config/configure
rm -f .config* util/img/mol-img

$(MAKE) -f debian/rules unpatch

build: build-stamp
build-stamp: patch
dh_testdir

# build the Debian specific manpages
(cd debian; \
for man in mol.7 moldeb.1 molrcget.1 strip_nwrom.1; \
do docbook-to-man $${man%?}sgml >$$man; \
done)

./configure --disable-png CFLAGS="$(CFLAGS)"
make defconfig

# build the package
$(MAKE) BUILD_MODS=n NETDRIVER=n $(DEBIANFLAGS)

# setup the build structure for the kernel modules
$(MAKE) -C src/kmod/Linux/ KERNEL_SOURCE=/lib/modules/`uname -r`/source 
\
setup-common
$(MAKE) -C src/netdriver/ setup-tree-common

touch $@

# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
dh_testdir
dh_testroot

dh_installdirs -a

# install the overrides file for lintian
install -o root -g root -m 644 debian/lintian.overrides \
debian/mol/usr/share/lintian/overrides/mol

# install the Mac-on-Linux emulator into mol.
$(MAKE) DESTDIR=`pwd`/debian/mol $(DEBIANFLAGS) install

rm debian/mol/usr/share/doc/mol/COPYING

convert -depth 8 -size 100x122 -frame 14x3 -mattecolor '#ce' \
-scale 25% rgb:`pwd`/mollib/graphics/bootlogo.raw \
debian/mol/usr/share/pixmaps/mol.xpm

# put together the mol-source package by copying t