]> git.saurik.com Git - apt.git/blobdiff - methods/makefile
refactor http client implementation
[apt.git] / methods / makefile
index d94a853401e74484d81a3730c3b82595670ced34..f8098de749ab4b7b3931e2f01af5c0c1bc1780c9 100644 (file)
@@ -7,7 +7,7 @@ include ../buildlib/defaults.mak
 BIN := $(BIN)/methods
 
 include ../buildlib/libversion.mak
 BIN := $(BIN)/methods
 
 include ../buildlib/libversion.mak
-APT_DOMAIN := libapt-pkg$(LIBAPTPKG_MAJOR)
+APT_DOMAIN := apt
 
 # The file method
 PROGRAM=file
 
 # The file method
 PROGRAM=file
@@ -39,7 +39,7 @@ include $(PROGRAM_H)
 
 # The cdrom method
 PROGRAM=cdrom
 
 # The cdrom method
 PROGRAM=cdrom
-SLIBS = -lapt-pkg -ldl $(INTLLIBS)
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 SOURCE = cdrom.cc
 include $(PROGRAM_H)
 LIB_MAKES = apt-pkg/makefile
 SOURCE = cdrom.cc
 include $(PROGRAM_H)
@@ -48,7 +48,7 @@ include $(PROGRAM_H)
 PROGRAM=http
 SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 PROGRAM=http
 SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
-SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc
+SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc
 include $(PROGRAM_H)
 
 # The https method
 include $(PROGRAM_H)
 
 # The https method
@@ -83,19 +83,12 @@ include $(PROGRAM_H)
 PROGRAM=mirror
 SLIBS = -lapt-pkg $(SOCKETLIBS)
 LIB_MAKES = apt-pkg/makefile
 PROGRAM=mirror
 SLIBS = -lapt-pkg $(SOCKETLIBS)
 LIB_MAKES = apt-pkg/makefile
-SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc
+SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc server.cc
 include $(PROGRAM_H)
 
 include $(PROGRAM_H)
 
-# The gzip method
-PROGRAM=bzip2
-SLIBS = -lapt-pkg $(INTLLIBS)
-LIB_MAKES = apt-pkg/makefile
-SOURCE = bzip2.cc
-include $(PROGRAM_H)
-
-# SSH and lzma method symlink
-binary: $(BIN)/ssh $(BIN)/lzma
-veryclean: clean-$(BIN)/ssh clean-$(BIN)/lzma
+# SSH method symlink
+binary: $(BIN)/ssh
+veryclean: clean-$(BIN)/ssh
 
 $(BIN)/ssh:
        echo "Installing ssh method link"
 
 $(BIN)/ssh:
        echo "Installing ssh method link"
@@ -103,8 +96,15 @@ $(BIN)/ssh:
 clean-$(BIN)/ssh:
        -rm $(BIN)/ssh
 
 clean-$(BIN)/ssh:
        -rm $(BIN)/ssh
 
-$(BIN)/lzma:
-       echo "Installing lzma method link"
-       ln -fs bzip2 $(BIN)/lzma
-clean-$(BIN)/lzma:
-       -rm $(BIN)/lzma
+# create links for all other compressors
+COMPRESSORS=bzip2 lzma xz
+
+binary: $(addprefix $(BIN)/,$(COMPRESSORS))
+veryclean: $(addprefix clean-$(BIN)/,$(COMPRESSORS))
+
+$(addprefix $(BIN)/,$(COMPRESSORS)): $(BIN)/gzip
+       echo "Installing $(notdir $@) method link"
+       ln -fs gzip $@
+
+$(addprefix clean-$(BIN)/,$(COMPRESSORS)):
+       -rm $(BIN)/$(notdir $@)