Completed debian changes. (Built first package.)
authorcmiller <cmiller>
Sun, 26 Nov 2000 23:40:22 +0000 (23:40 +0000)
committercmiller <cmiller>
Sun, 26 Nov 2000 23:40:22 +0000 (23:40 +0000)
autoconf'd on top level.  Maybe this should be in the Makefile.

Makefile
debian/README [new file with mode: 0644]
debian/TODO [new file with mode: 0644]
debian/control
debian/copyright [new file with mode: 0644]
debian/dirs
debian/freeradius.undocumented [new file with mode: 0644]
debian/postrm
debian/rules

index 12ea5f3..f991a00 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ install:
        $(INSTALL) -d -m 755    $(R)$(mandir);
        for i in 1 5 8; do \
                $(INSTALL) -d -m 755    $(R)$(mandir)/man$$i; \
-               $(INSTALL) -m 444 man/man$$i/*.$$i $(R)$(mandir)/man$$i; \
+               $(INSTALL) -m 644 man/man$$i/*.$$i $(R)$(mandir)/man$$i; \
        done
        @echo "Creating/updating files in $(R)$(raddbdir)"; \
        $(INSTALL) -d -m 755    $(R)$(raddbdir); \
diff --git a/debian/README b/debian/README
new file mode 100644 (file)
index 0000000..a5f4b5f
--- /dev/null
@@ -0,0 +1,11 @@
+
+In the radiusd.conf file, broken/unconfigured/useless things are commented-out 
+by '#deb#' :
+ - pam module isn't installed
+ - radutmp works, but isn't configured
+ - sql isn't configured
+ - example is a development example
+
+Chad Miller <cmiller@surfsouth.com>  Sun, 26 Nov 2000 15:16:28 -0500
+
+$Id$
diff --git a/debian/TODO b/debian/TODO
new file mode 100644 (file)
index 0000000..6cce533
--- /dev/null
@@ -0,0 +1,9 @@
+TODO list for the Debian package:
+
+22 Nov 2000 -- Javier Fernández-Sanguino Peña 
+Since libltdl is an independent Debian package this one should compile against
+current Debian version and should *not* install it by himself.
+
+26 Nov 2000 -- Chad Miller
+Begin writing manpages for topics listed in the debian/freeradius.undocumented
+file.
index c818893..b841795 100644 (file)
@@ -6,12 +6,14 @@ Standards-Version: 3.2.1
 
 Package: freeradius
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, libltdl | libltdl0
+Build-depends: libltdl-dev | libltdl0-dev
 Provides: radiusd
 Conflicts: radiusd, radiusd-livingston, radiusd-cistron
 Description: A high-performance and highly configurable RADIUS server
  A high-performance and highly configurable RADIUS server.  freeradius is 
- similar to Livingston's 2.0 server, but has support for...
+ similar to Livingston's 2.0 and derived from Cistron's server, but has 
+ support for...
   - many vendor-specific attributes
   - proxying and replicating requests by any criteria
   - authentication on system passwd, MySQL, LDAP, users, PAM
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..d7562c6
--- /dev/null
@@ -0,0 +1,14 @@
+This package was debianized by Chad Miller <cmiller@surfsouth.com> on
+Fri, 24 Nov 2000 16:25:57 -0500.
+
+It was downloaded from http://freeradius.org/
+
+See the 'credits' file for authorship information.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+On Debian systems, the complete text of the GNU General Public License can be
+found in /usr/share/common-licenses/GPL file.
index 7c40793..df6786a 100644 (file)
@@ -1,4 +1,5 @@
 etc/
+etc/raddb
 etc/cron.daily
 etc/cron.monthly
 etc/init.d
@@ -13,6 +14,5 @@ usr/share/doc/freeradius
 usr/sbin
 usr/bin
 usr/lib
-usr/include
 var/
 var/log
diff --git a/debian/freeradius.undocumented b/debian/freeradius.undocumented
new file mode 100644 (file)
index 0000000..6fcd496
--- /dev/null
@@ -0,0 +1,13 @@
+check-radiusd-config.8.gz
+checkrad.8.gz
+radtest.8.gz
+radlast.8.gz
+radwatch.8.gz
+radwho.8.gz
+radzap.8.gz
+radiusd.8.gz
+users.5.gz
+clients.5.gz
+hints.5.gz
+huntgroups.5.gz
+proxy.conf.5.gz
index 055d3f3..b1abea0 100755 (executable)
@@ -2,12 +2,10 @@
 
 case "$1" in
        remove)
-               update-rc.d radiusd remove > /dev/null
                ;;
        purge)
-               update-rc.d radiusd remove > /dev/null
                rmdir /etc/raddb 2>/dev/null
-               cd /var/log
+               cd /var/log/radiusd
                rm -f radius.log radius.log.0 radius.log.*.gz
                rm -f radwtmp radwtmp.0 radwtmp.*.gz
                rm -f radutmp radwatch.log
@@ -17,4 +15,10 @@ case "$1" in
                ;;
 esac
 
+case "$1" in
+       remove|purge)
+               update-rc.d radiusd remove > /dev/null
+               ;;
+esac
+
 exit 0
index 74bb9a3..c22cc4c 100755 (executable)
@@ -9,6 +9,11 @@ SHELL=/bin/bash
 package = freeradius
 tmp     = $(shell pwd)/debian/tmp
 
+prefix = /
+exec_prefix    = /usr
+mandir = $(exec_prefix)/share/man
+pkgdocdir      = $(exec_prefix)/share/doc/freeradius
+
 define checkdir
        test -f src/main/radiusd.c
 endef
@@ -16,7 +21,7 @@ endef
 build:
 # Builds the binary package.
        $(checkdir)
-       ./configure --prefix=/ --exec_prefix='/usr' --infodir='$${exec_prefix}/share/info' --mandir='$${exec_prefix}/share/man' --with-datadir='$${exec_prefix}/share' --includedir='$${exec_prefix}/include' --with-thread-pool --with-logdir='/var/log/radius'
+       ./configure --prefix=$(prefix) --exec-prefix=$(exec_prefix) --mandir=$(mandir) --with-thread-pool --enable-ltdl-install=no
        make
        touch build
 
@@ -26,37 +31,57 @@ binary-indep:   build
 
 # Make a binary package (.deb file)
 binary-arch:   build checkroot
-       -rm -rf $(tmp)
+       dh_clean
        dh_installdirs
-       make install prefix=/ exec_prefix=/usr R=$(tmp)
-       for documented in man1/radlast.1 man5/acct_users.5 man8/builddbm.8; do \
-               chmod 644 $(tmp)/usr/share/man/$${documented}; \
-               gzip -9 $(tmp)/usr/share/man/$${documented}; \
+       make install prefix=$(prefix) exec_prefix=$(exec_prefix) mandir=$(mandir) R=$(tmp)
+       # clean up install cruft.  $$&@!%
+       rmdir $(tmp)/include
+       rm $(tmp)/usr/sbin/rc.radiusd
+       # man pages & docs
+       find $(tmp)$(mandir) -type f -exec gzip -9 {} \;  # policy, sec 6.1
+       dh_undocumented 
+       install -g root -m 644 debian/copyright $(tmp)$(pkgdocdir)/copyright  # policy, sec 6.6
+       install -g root -m 644 debian/TODO $(tmp)$(pkgdocdir)/todo.Debian
+       install -g root -m 644 CREDITS $(tmp)$(pkgdocdir)/credits
+       for doc in doc/*; do \
+               [ -f $$doc -a "$$doc" != doc/Makefile ] && install -g root -m 644 $$doc $(tmp)$(pkgdocdir)/; \
        done
-       dh_undocumented check-radiusd-config.1 checkrad.1 radiusd.1 radtest.1 radwatch.1 radwho.1 radzap.1
-       chmod 644 $(tmp)/usr/lib/*
-       #strip --strip-unneeded $(tmp)/usr/lib/*.{a,so.*}
-       dh_strip
-       #
-       install -g root -m 644 COPYRIGHT $(tmp)/usr/share/doc/freeradius/copyright
-       install -g root -m 644 CREDITS $(tmp)/usr/share/doc/freeradius/credits
-       rm $(tmp)/usr/sbin/rc.radiusd; install -g root -m 755 scripts/rc.radiusd $(tmp)/etc/init.d/radiusd
+       mv $(tmp)$(pkgdocdir)/ChangeLog $(tmp)$(pkgdocdir)/changelog  # policy, sec 6.8
+       # supporting programs
+       install -g root -m 755 scripts/rc.radiusd $(tmp)/etc/init.d/radiusd
        install -g root -m 755 scripts/radiusd.cron.daily $(tmp)/etc/cron.daily/radiusd
        install -g root -m 755 scripts/radiusd.cron.monthly $(tmp)/etc/cron.monthly/radiusd
+       # fix up conf file  --  all of these should be commented on in README.Debian
+       cp $(tmp)/etc/raddb/radiusd.conf newconf
+       cat newconf \
+               | sed -e 's/        /   /g' \
+               | sed -e 's/       /    /g' \
+               | sed -e '/^    pam {/,/^       }/s/^/#deb#/' \
+               | sed -e 's/^   pam$$/#deb#     pam/' \
+               | sed -e 's/^   radutmp$$/#deb# radutmp/' \
+               | sed -e '/^    example {/,/^   }/s/^/#deb#/' \
+               | sed -e '/^    sql .*{/,/^     }/s/^/#deb#/' \
+               | sed -e 's/^           #       shadow          =/              shadow          =/' \
+               | sed -e 's/^group = nobody/group = nogroup/' \
+                       > $(tmp)/etc/raddb/radiusd.conf
+       rm newconf
+       # 
+       dh_strip
        dh_installdeb
        dh_installchangelogs
-       dh_makeshlibs
-       dh_shlibdeps
        dh_compress
        dh_fixperms
+       dh_makeshlibs
+       dh_shlibdeps
+       dh_md5sums
        dh_gencontrol
-       dpkg --build $(tmp) ..
-       rm -rf $(tmp)
+       dh_builddeb
+       dh_clean
 
 clean: checkroot
        [ -f Make.inc ] && make distclean || true
        rm -f build debian/{files,substvars}
-       rm -rf $(tmp)
+       dh_clean
 
 binary: binary-indep binary-arch