# # This makefile is responsible for making the deb for the ltmodem-source package # (not the ltmodem driver itself). # URL = http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/ltmodem-2.6-alk-8.tar.bz2 TMPDIR = /tmp #FILE = $(shell expr $(URL) : '.*/\([^/]*\)\$$') FILE = $(TMPDIR)/ltmodem-2.6-alk-8.tar.bz2 compile: $(FILE) # unpack the downloaded sources rm -fr $(TMPDIR)/modules mkdir -p $(TMPDIR)/modules tar xCjf $(TMPDIR)/modules $(FILE) mv $(TMPDIR)/modules/ltmodem-2.6-alk-8 $(TMPDIR)/modules/ltmodem # patch the sources so they will compile patch -d $(TMPDIR)/modules/ltmodem < ltmodem/ltmodem-2.6-alk-8-kernel-changes.patch # copy in the files that the original sources don't provide cp ltmodem/ltmodem_udev $(TMPDIR)/modules/ltmodem/55-ltmodem.rules cp -a ltmodem/debian $(TMPDIR)/modules/ltmodem/debian # bundle it all up again tar cCjf $(TMPDIR) - modules/ltmodem > ltmodem/ltmodem.tar.bz2 $(FILE): echo "getting sources from internet ..." wget -O $(FILE) $(URL) install: @# Install left to debian/rules as it has more appropriate @# variables we should more logically avoid using from here. clean: rm -fr $(TMPDIR)/modules $(FILE) ltmodem/ltmodem.tar.bz2 debian: ALWAYS_OUT_OF_DATE fakeroot dpkg-buildpackage -uc -us debianclean: fakeroot make -f debian/rules clean ALWAYS_OUT_OF_DATE: