blob: 55d0a1285d9625c3cbda5aaad9ed59a4568d818e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
#
# pacman
#
# Copyright (c) 2002 by Judd Vinet <jvinet@zeroflux.org>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
# NOTE: Since pacman is compiled statically, you will need the static
# libraries for zlib and glibc.
DESTDIR =
prefix = @prefix@
exec_prefix = @prefix@
BINDIR = @bindir@
MANDIR = @mandir@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACVER = 2.8.2
TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/
OBJDIR = $(TOPDIR)/src/
MANSRC = $(TOPDIR)/doc/
SCRDIR = $(TOPDIR)/scripts/
CXX = @CC@
CXXFLAGS += @CFLAGS@ -g -Wall -pedantic -fno-exceptions \
-D_GNU_SOURCE -DPACVER=\"$(PACVER)\" -I. -Ilibftp
LDFLAGS += @LDFLAGS@ -static -Llibftp -lftp -ltar -lz
SRCS = $(SRCDIR)pacman.c \
$(SRCDIR)db.c \
$(SRCDIR)util.c \
$(SRCDIR)list.c \
$(SRCDIR)package.c \
$(SRCDIR)pacsync.c \
$(SRCDIR)md5.c \
$(SRCDIR)md5driver.c \
$(SRCDIR)vercmp.c \
$(SRCDIR)rpmvercmp.c
OBJECTS = $(OBJDIR)pacman.o \
$(OBJDIR)db.o \
$(OBJDIR)util.o \
$(OBJDIR)list.o \
$(OBJDIR)package.o \
$(OBJDIR)pacsync.o \
$(OBJDIR)md5.o \
$(OBJDIR)md5driver.o \
$(OBJDIR)rpmvercmp.o
all: libftp.a pacman vercmp convertdb man
pacman: $(OBJECTS) libftp.a
$(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
vercmp: $(OBJDIR)vercmp.o $(OBJDIR)rpmvercmp.o
$(CXX) $(OBJDIR)vercmp.o $(OBJDIR)rpmvercmp.o $(CXXFLAGS) -o $@
convertdb: $(OBJDIR)convertdb.o $(OBJDIR)list.o $(OBJDIR)util.o
$(CXX) $(OBJDIR)convertdb.o $(OBJDIR)list.o $(OBJDIR)util.o $(CXXFLAGS) -lz -ltar -o $@
.c.o: $(SRCS)
$(CXX) $(CXXFLAGS) -o $@ -c $<
man: $(MANSRC)pacman.8 \
$(MANSRC)makepkg.8
%.8: %.8.in
sed -e "s/#VERSION#/$(PACVER)/" $< > $@
dist: distclean
(cd ..; tar czvf pacman-$(PACVER).tar.gz pacman-$(PACVER))
libftp.a:
(cd libftp; make libftp.a)
install: pacman vercmp convertdb man
$(INSTALL) -D -m0755 pacman $(DESTDIR)$(BINDIR)/pacman
$(INSTALL) -D -m0755 vercmp $(DESTDIR)$(BINDIR)/vercmp
$(INSTALL) -D -m0755 convertdb $(DESTDIR)$(BINDIR)/convertdb
$(INSTALL) -D -m0755 $(SCRDIR)makepkg $(DESTDIR)$(BINDIR)/makepkg
$(INSTALL) -D -m0755 $(SCRDIR)makeworld $(DESTDIR)$(BINDIR)/makeworld
$(INSTALL) -D -m0755 $(SCRDIR)gensync $(DESTDIR)$(BINDIR)/gensync
$(INSTALL) -D -m0644 $(MANSRC)pacman.8 $(DESTDIR)$(MANDIR)/man8/pacman.8
$(INSTALL) -D -m0644 $(MANSRC)makepkg.8 $(DESTDIR)$(MANDIR)/man8/makepkg.8
$(INSTALL) -D -m0644 etc/pacman.conf $(DESTDIR)/etc/pacman.conf
$(INSTALL) -D -m0644 etc/makepkg.conf $(DESTDIR)/etc/makepkg.conf
clean:
rm -f *~ $(OBJDIR)*.o $(MANSRC)*.8
(cd libftp; make clobber)
distclean: clean
rm -f pacman convertdb vercmp
rm -f Makefile
rm -f config.h config.status config.log
# End of file
|