wmpager: autotoolized
This commit is contained in:
parent
4e1ac99cc3
commit
2951f4349a
|
@ -1,77 +0,0 @@
|
||||||
# $Id: Makefile,v 1.3 2002/08/16 17:22:26 essmann Exp $
|
|
||||||
#
|
|
||||||
# Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
|
|
||||||
# All rights reserved.
|
|
||||||
|
|
||||||
.SILENT:
|
|
||||||
|
|
||||||
INSTALLDIR = /usr/local
|
|
||||||
|
|
||||||
all: wmpager
|
|
||||||
|
|
||||||
wmpager:
|
|
||||||
@echo "*** `pwd`: $@" ; \
|
|
||||||
cd src ; \
|
|
||||||
$(MAKE) $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "*** `pwd`: $@" ; \
|
|
||||||
cd src ; \
|
|
||||||
$(MAKE) $@
|
|
||||||
|
|
||||||
install:
|
|
||||||
echo "*** `pwd`: $@" ; \
|
|
||||||
if [ ! -f src/wmpager ] ; then \
|
|
||||||
$(MAKE) wmpager ; \
|
|
||||||
fi ; \
|
|
||||||
if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
|
|
||||||
echo "you must be root to install wmpager!" ; \
|
|
||||||
exit ; \
|
|
||||||
fi ; \
|
|
||||||
for i in bin/wmpager man/man1/wmpager.1x ; do \
|
|
||||||
if [ -f ${INSTALLDIR}/$$i ] ; then \
|
|
||||||
echo "there's already a $$i in ${INSTALLDIR}" ; \
|
|
||||||
echo "installation aborted." ; \
|
|
||||||
exit ; \
|
|
||||||
fi ; \
|
|
||||||
done ; \
|
|
||||||
if [ ! -d ${INSTALLDIR}/bin ] ; then \
|
|
||||||
mkdir -p ${INSTALLDIR}/bin ; \
|
|
||||||
fi ; \
|
|
||||||
echo "copying wmpager to ${INSTALLDIR}/bin" ; \
|
|
||||||
cp src/wmpager ${INSTALLDIR}/bin/wmpager ; \
|
|
||||||
chmod 755 ${INSTALLDIR}/bin/wmpager ; \
|
|
||||||
if [ ! -d ${INSTALLDIR}/man/man1 ] ; then \
|
|
||||||
mkdir -p ${INSTALLDIR}/man/man1 ] ; \
|
|
||||||
fi ; \
|
|
||||||
echo "copying manual page to ${INSTALLDIR}/man/man1" ; \
|
|
||||||
cp man/man1/wmpager.1x ${INSTALLDIR}/man/man1/wmpager.1x ; \
|
|
||||||
chmod 644 ${INSTALLDIR}/man/man1/wmpager.1x ; \
|
|
||||||
echo "copying theme files to ${INSTALLDIR}/share/wmpager" ; \
|
|
||||||
if [ ! -d ${INSTALLDIR}/share/wmpager ] ; then \
|
|
||||||
mkdir -p ${INSTALLDIR}/share/wmpager ; \
|
|
||||||
fi ; \
|
|
||||||
cp src/buttons.xpm ${INSTALLDIR}/share/wmpager/blue.xpm ; \
|
|
||||||
cp themes/*.xpm ${INSTALLDIR}/share/wmpager ; \
|
|
||||||
chmod 644 ${INSTALLDIR}/share/wmpager/* ; \
|
|
||||||
echo "installation complete, make sure your have ${INSTALLDIR}/bin" ; \
|
|
||||||
echo "in your PATH and ${INSTALLDIR}/man in your MANPATH."
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
echo "*** `pwd`: $@" ; \
|
|
||||||
if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
|
|
||||||
echo "you must be root to uninstall wmpager!" ; \
|
|
||||||
exit ; \
|
|
||||||
fi ; \
|
|
||||||
for i in bin/wmpager man/man1/wmpager.1x ; do \
|
|
||||||
if [ -f ${INSTALLDIR}/$$i ] ; then \
|
|
||||||
echo "removing $$i from ${INSTALLDIR}" ; \
|
|
||||||
rm -f ${INSTALLDIR}/$$i ; \
|
|
||||||
fi ; \
|
|
||||||
done ; \
|
|
||||||
if [ -d ${INSTALLDIR}/share/wmpager ] ; then \
|
|
||||||
echo "removing directory $$i from ${INSTALLDIR}" ; \
|
|
||||||
rm -rf ${INSTALLDIR}/share/wmpager ; \
|
|
||||||
fi ; \
|
|
||||||
echo "uninstallation complete."
|
|
||||||
|
|
31
wmpager/configure.ac
Normal file
31
wmpager/configure.ac
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
AC_PREREQ([2.60])
|
||||||
|
AC_INIT([wmpager], [1.2], [wmaker-dev@lists.windowmaker.org])
|
||||||
|
AC_CONFIG_SRCDIR([src/wmpager.c])
|
||||||
|
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
|
||||||
|
AM_SILENT_RULES
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
PKG_CHECK_MODULES([X], [x11 xext xpm])
|
||||||
|
AC_SUBST([X_CFLAGS])
|
||||||
|
AC_SUBST([X_LIBS])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_CHECK_FUNCS([gettimeofday select strdup])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile
|
||||||
|
man/Makefile
|
||||||
|
src/Makefile
|
||||||
|
themes/Makefile])
|
||||||
|
AC_OUTPUT
|
3
wmpager/man/Makefile.am
Normal file
3
wmpager/man/Makefile.am
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
man1_MANS = wmpager.1x
|
||||||
|
|
||||||
|
EXTRA_DIST = $(man1_MANS)
|
|
@ -1,32 +0,0 @@
|
||||||
# $Id: Makefile,v 1.2 2002/08/16 17:22:26 essmann Exp $
|
|
||||||
#
|
|
||||||
# Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
|
|
||||||
# All rights reserved.
|
|
||||||
|
|
||||||
.SILENT:
|
|
||||||
|
|
||||||
XPMINC = /usr/X11R6/include
|
|
||||||
XPMLIB = /usr/X11R6/lib
|
|
||||||
|
|
||||||
INCLUDES = -I/usr/X11R6/include -I/usr/local/include -I/usr/include/X11R6 -I$(XPMINC)
|
|
||||||
LIBINC = -L/usr/X11R6/lib -L/usr/include/lib -L$(XPMLIB)
|
|
||||||
LIBS = -lm -lX11 -lXpm -lXext
|
|
||||||
|
|
||||||
TARGET = wmpager
|
|
||||||
OBJECTS = wmpager.o
|
|
||||||
SOURCE = wmpager.c
|
|
||||||
|
|
||||||
all: ${TARGET}
|
|
||||||
|
|
||||||
${OBJECTS}: ${SOURCE}
|
|
||||||
@echo "*** `pwd`: $@" ; \
|
|
||||||
gcc -g -c -Wall ${INCLUDES} ${FLAGS} $< -o $*.o
|
|
||||||
|
|
||||||
${TARGET}: ${OBJECTS}
|
|
||||||
@echo "*** `pwd`: $@" ; \
|
|
||||||
gcc -g -o ${TARGET} ${OBJECTS} ${LIBINC} ${LIBS}
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "*** `pwd`: $@" ; \
|
|
||||||
for i in ${OBJECTS}; do if [ -f $$i ] ; then rm $$i; fi; done ; \
|
|
||||||
if [ -f ${TARGET} ] ; then rm ${TARGET}; fi
|
|
4
wmpager/src/Makefile.am
Normal file
4
wmpager/src/Makefile.am
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
bin_PROGRAMS = wmpager
|
||||||
|
wmpager_SOURCES = wmpager.c buttons.xpm screen.xpm
|
||||||
|
wmpager_CPPFLAGS = -DWMPAGER_DEFAULT_INSTALL_DIR=\"$(pkgdatadir)/\" @X_CFLAGS@
|
||||||
|
wmpager_LDADD = @X_LIBS@
|
3
wmpager/themes/Makefile.am
Normal file
3
wmpager/themes/Makefile.am
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
pkgdata_DATA = fire.xpm gray.xpm steel.xpm
|
||||||
|
|
||||||
|
EXTRA_DIST = $(pkgdata_DATA)
|
Loading…
Reference in a new issue