wmppp.app: Update Makefile.
Main change is to use $(INSTALL) instead of cp in install target along with $(DESTDIR) variable. We also remove installation of user ~/.wmppprc config file -- this isn't useful for sysadmins or package maintainers. We also update INSTALL to reflect the changes.
This commit is contained in:
parent
9dab93996e
commit
7631c7d566
2 changed files with 31 additions and 20 deletions
|
@ -38,8 +38,9 @@ up pppd's configuration files, but do want them to be able
|
||||||
to make a dialup connection, a sample system.rc file is
|
to make a dialup connection, a sample system.rc file is
|
||||||
included (system.wmppprc), please take a look at it!
|
included (system.wmppprc), please take a look at it!
|
||||||
|
|
||||||
The installation will install standard rc files in $HOME
|
The installation will install a standard rc file in /etc
|
||||||
and /etc/ WITHOUT the 'force' option!
|
WITHOUT the 'force' option! You can also create one in
|
||||||
|
$HOME (~/.wmpprc).
|
||||||
|
|
||||||
How it works:
|
How it works:
|
||||||
|
|
||||||
|
@ -75,6 +76,8 @@ General Notes
|
||||||
Note 1: If "make install" fails on your system, please edit
|
Note 1: If "make install" fails on your system, please edit
|
||||||
the Makefile to set the paths according to your setup.
|
the Makefile to set the paths according to your setup.
|
||||||
Make install defaults to /usr/local/bin & /etc/ppp/.
|
Make install defaults to /usr/local/bin & /etc/ppp/.
|
||||||
|
You may also change these directories using the various
|
||||||
|
variables, e.g., make PREFIX=/usr.
|
||||||
|
|
||||||
Note 2: Please DO read the HINTS, this file contains some
|
Note 2: Please DO read the HINTS, this file contains some
|
||||||
very useful tips and hints about WMPPP.
|
very useful tips and hints about WMPPP.
|
||||||
|
|
|
@ -1,36 +1,44 @@
|
||||||
LIBDIR = -L/usr/X11R6/lib
|
|
||||||
LIBS = -lXpm -lXext -lX11
|
LIBS = -lXpm -lXext -lX11
|
||||||
CFLAGS += -O2
|
|
||||||
OBJS = wmppp.o \
|
OBJS = wmppp.o \
|
||||||
wmgeneral/wmgeneral.o \
|
wmgeneral/wmgeneral.o \
|
||||||
wmgeneral/misc.o \
|
wmgeneral/misc.o \
|
||||||
wmgeneral/list.o
|
wmgeneral/list.o
|
||||||
|
|
||||||
.c.o:
|
INSTALL = install
|
||||||
cc -g -c $(CPPFLAGS) $(CFLAGS) -Wall $< -o $*.o
|
INSTALL_PROGRAM = $(INSTALL)
|
||||||
|
INSTALL_DATA = $(INSTALL) -m 644
|
||||||
|
|
||||||
wmppp: $(OBJS)
|
PREFIX = /usr/local
|
||||||
cc -o wmppp $(LDFLAGS) $^ -lXext $(LIBDIR) $(LIBS)
|
BINDIR = $(PREFIX)/bin
|
||||||
|
LIBDIR = $(PREFIX)/lib/wmppp.app
|
||||||
|
SYSCONFDIR = /etc
|
||||||
|
MANDIR = $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
all:: wmppp getmodemspeed
|
all:: wmppp getmodemspeed
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
wmppp: $(OBJS)
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
|
getmodemspeed: getmodemspeed.o
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
for i in $(OBJS) ; do \
|
for i in $(OBJS) ; do \
|
||||||
rm -f $$i; \
|
rm -f $$i; \
|
||||||
done
|
done
|
||||||
|
rm -f getmodemspeed.o
|
||||||
rm -f wmppp getmodemspeed
|
rm -f wmppp getmodemspeed
|
||||||
|
|
||||||
install::
|
install::
|
||||||
|
$(INSTALL) -d $(DESTDIR)$(BINDIR)
|
||||||
cp -f wmppp /usr/local/bin/
|
$(INSTALL_PROGRAM) wmppp $(DESTDIR)$(BINDIR)
|
||||||
chmod 755 /usr/local/bin/wmppp
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
||||||
chown root:root /usr/local/bin/wmppp
|
$(INSTALL_PROGRAM) getmodemspeed $(DESTDIR)$(LIBDIR)
|
||||||
cp getmodemspeed /etc/ppp/
|
$(INSTALL) -d $(DESTDIR)$(SYSCONFDIR)
|
||||||
chmod 755 /etc/ppp/getmodemspeed
|
$(INSTALL_DATA) user.wmppprc $(DESTDIR)$(SYSCONFDIR)/wmppprc
|
||||||
chown root.root /etc/ppp/getmodemspeed
|
$(INSTALL) -d $(DESTDIR)$(MANDIR)
|
||||||
cp -f user.wmppprc /etc/wmppprc
|
$(INSTALL_DATA) wmppp.1 $(DESTDIR)$(MANDIR)
|
||||||
chmod 644 /etc/wmppprc
|
|
||||||
chown root.root /etc/wmppprc
|
|
||||||
cp -f user.wmppprc $(HOME)/.wmppprc
|
|
||||||
cp -f wmppp.1 /usr/local/share/man/man1
|
|
||||||
echo "WMPPP installation finished."
|
echo "WMPPP installation finished."
|
||||||
|
|
Loading…
Reference in a new issue