STEP UP PHOBOS DEVELOPMENT 10 FOLD
Anders F Björklund
afb at algonet.se
Thu Jun 15 03:22:07 PDT 2006
Georg Wrede wrote:
> Exactly.
>
> (My point being that Walter doesn't have the time to study shell scripts
> or makefiles, so a ready-made one should be given to him.)
There has been several written. But Walter doesn't like ready packages ?
Partly I can understand where he is coming from on that; if the user
unpacks and installs the software themselves, they know where it went
and that it isn't doing anything "extra" - like install malware etc...
It's just that it is a hassle to type those commands, and then amplified
when wanting to upgrade or uninstall ? Thus, I prefer using RPM instead.
I could duplicate all the steps that I used, but it's in the "dmd.spec"
Not everyone uses RPM, but it's easy to adapt to a .deb or .ebuild too ?
> Incidentally, should that script be in dmd/bin or dmd/src?
> (My vote: src.)
I think it should be something like "dmd/install.sh", in that case...
(since DMD doesn't come with the complete sources to "bin", in "src")
#!/bin/sh
install -d /usr/local/bin
install -p -m 0755 bin/dmd bin/obj2asm bin/dumpobj \
/usr/local/bin
install -d /usr/local/man/man1
install -p -m 0644 man/man1/dmd.1 man/man1/obj2asm.1 \
man/man1/dumpobj.1 /usr/local/man/man1
install -d /usr/local/lib
install -p -m 0644 lib/libphobos.a /usr/local/lib
install -d /usr/local/lib/phobos
(cd src/phobos; find -name '*.d' | xargs tar c) | \
(cd /usr/local/lib/phobos; tar xv)
cat > /etc/dmd.conf <<__EOF__
[Environment]
DFLAGS="-I/usr/local/lib/phobos"
__EOF__
Something to that effect. Would install DMD and Phobos to /usr/local ?
Where "/usr/local" should probably be written as "${DESTDIR}$prefix":
DESTDIR=
prefix=/usr/local
Or even use $(bindir) and $(libdir), and default those to use $(prefix)
bindir=$prefix/bin
libdir=$prefix/lib
Walter can use as much or as little of it as he wants, I'm doing GDC....
(no use in doing more packages for DMD, since they can't be distributed)
--anders
More information about the Digitalmars-d
mailing list