Permalink
Browse files

debian patch from David Welton applied

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@685 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent b8795d6 commit 5d32ac8683e587d1c190721b3ec10d0985e947df @klacke committed May 24, 2004
Showing with 122 additions and 40 deletions.
  1. +107 −0 debian/rules
  2. +2 −2 include.mk.in
  3. +0 −21 scripts/Install
  4. +7 −6 scripts/Makefile
  5. +0 −8 scripts/yaws.conf
  6. +6 −3 src/Makefile
View
107 debian/rules
@@ -0,0 +1,107 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #/usr/bin/docbook-to-man debian/yaws.sgml > yaws.1
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp config.status
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) clean
+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
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/yaws.
+ $(MAKE) install prefix=$(CURDIR)/debian/yaws INSTALLPREFIX=$(CURDIR)/debian/yaws/usr DESTDIR=$(CURDIR)/debian/yaws
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
View
4 include.mk.in
@@ -2,8 +2,8 @@
PREFIX = @prefix@
-ETCDIR = $(DESTDIR)@sysconfdir@
-VARDIR = $(DESTDIR)@localstatedir@
+ETCDIR = $(DESTDIR)/etc
+VARDIR = $(DESTDIR)/var
INSTALLPREFIX = $(DESTDIR)$(PREFIX)
ERL=@ERL@
View
21 scripts/Install
@@ -19,30 +19,9 @@ cat yaws.template | \
chmod +x ${installprefix}/bin/yaws
-
-
-
install -d ${installprefix}/lib/yaws/examples/ebin
install -d ${installprefix}/lib/yaws/examples/include
-if [ -f ${etcdir}/yaws.conf ]; then
- target=${etcdir}/yaws.conf.template
-else
- target=${etcdir}/yaws.conf
-fi
-echo "--- Writing config file to ${target}"
-
-
-cat yaws.conf.template | \
- ./Subst %yawsdir% ${prefix}/lib/yaws | \
- ./Subst %logdir% /var/log/yaws | \
- ./Subst %host% `hostname` | \
- ./Subst %port% 80 | \
- ./Subst %docroot% ${vardir}/yaws/www | \
- ./Subst %certdir% ${etcdir} | \
- ./Subst %sslport% 443 > ${target}
-
-
if [ -f /etc/gentoo-release ]; then
install -d ${etcdir}/init.d/
install -d ${etcdir}/conf.d/
View
13 scripts/Makefile
@@ -1,7 +1,7 @@
include ../include.mk
-all debug: ../bin/yaws
+all debug: ../bin/yaws yaws.conf
../bin/yaws: yaws.template
cat yaws.template | \
@@ -31,16 +31,17 @@ local_install: ../bin/yaws
cp ../bin/yaws $$HOME/bin/yaws; \
echo "--- Installed $$HOME/bin/yaws"
+yaws.conf:
+ echo PREFIX is $(PREFIX)
+ cat yaws.conf.template | ./Subst %yawsdir% $(PREFIX)/lib/yaws | ./Subst %logdir% /var/log/yaws | ./Subst %host% `hostname` | ./Subst %port% 80 | ./Subst %docroot% $(VARDIR)/yaws/www | ./Subst %certdir% $(ETCDIR) | ./Subst %sslport% 443 > yaws.conf
+
clean:
rm -f ../bin/yaws
install:
-rm -rf /tmp/yaws 2> /dev/null
sh ./Install $(PREFIX) $(INSTALLPREFIX) "$(ERL)" \
- "$(WERL)" $(ETCDIR) $(VARDIR)
+ "$(WERL)" /etc/ /var/
@cp ../ssl/yaws-cert.pem $(ETCDIR)
@cp ../ssl/yaws-key.pem $(ETCDIR)
-
-
-
-
+ cp yaws.conf $(prefix)/etc/
View
8 scripts/yaws.conf
@@ -1,8 +0,0 @@
-
-# configuartion template for yaws
-
-
-port = 80
-listen = 127.0.0.1
-logdir =
-
View
9 src/Makefile
@@ -64,12 +64,15 @@ install: all docsinstall
install -d $(INSTALLPREFIX)/lib/yaws/ebin
install -d $(VARDIR)/log/yaws
install -d $(VARDIR)/yaws/ebin
- (cd ..; tar cf - ebin ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
- (cd ..; tar cf - include ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
+ cp -r ../ebin/* $(INSTALLPREFIX)/lib/yaws/
+ cp -r ../include/* $(INSTALLPREFIX)/lib/yaws/
+# (cd ..; tar cf - ebin ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
+# (cd ..; tar cf - include ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
docsinstall:
install -d $(VARDIR)/yaws/www
- (cd ..; tar cf - www ) | (cd $(VARDIR)/yaws; tar xf - )
+ cp -r ../www/* $(VARDIR)/yaws
+ #(cd ..; tar cf - www ) | (cd $(VARDIR)/yaws; tar xf - )

0 comments on commit 5d32ac8

Please sign in to comment.