From 2951f4349a99951f0f530349d24320d1b1dfef90 Mon Sep 17 00:00:00 2001 From: "Alexey I. Froloff" Date: Thu, 23 Aug 2012 15:42:12 +0400 Subject: [PATCH] wmpager: autotoolized --- wmpager/Makefile | 77 ------------------------------- wmpager/configure.ac | 31 +++++++++++++ wmpager/man/Makefile.am | 3 ++ wmpager/man/{man1 => }/wmpager.1x | 0 wmpager/src/Makefile | 32 ------------- wmpager/src/Makefile.am | 4 ++ wmpager/themes/Makefile.am | 3 ++ 7 files changed, 41 insertions(+), 109 deletions(-) delete mode 100644 wmpager/Makefile create mode 100644 wmpager/configure.ac create mode 100644 wmpager/man/Makefile.am rename wmpager/man/{man1 => }/wmpager.1x (100%) delete mode 100644 wmpager/src/Makefile create mode 100644 wmpager/src/Makefile.am create mode 100644 wmpager/themes/Makefile.am diff --git a/wmpager/Makefile b/wmpager/Makefile deleted file mode 100644 index c0089b5..0000000 --- a/wmpager/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# $Id: Makefile,v 1.3 2002/08/16 17:22:26 essmann Exp $ -# -# Copyright (c) 2001 Bruno Essmann -# 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." - diff --git a/wmpager/configure.ac b/wmpager/configure.ac new file mode 100644 index 0000000..e96d64b --- /dev/null +++ b/wmpager/configure.ac @@ -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 diff --git a/wmpager/man/Makefile.am b/wmpager/man/Makefile.am new file mode 100644 index 0000000..5e546e8 --- /dev/null +++ b/wmpager/man/Makefile.am @@ -0,0 +1,3 @@ +man1_MANS = wmpager.1x + +EXTRA_DIST = $(man1_MANS) diff --git a/wmpager/man/man1/wmpager.1x b/wmpager/man/wmpager.1x similarity index 100% rename from wmpager/man/man1/wmpager.1x rename to wmpager/man/wmpager.1x diff --git a/wmpager/src/Makefile b/wmpager/src/Makefile deleted file mode 100644 index 4ec190d..0000000 --- a/wmpager/src/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# $Id: Makefile,v 1.2 2002/08/16 17:22:26 essmann Exp $ -# -# Copyright (c) 2001 Bruno Essmann -# 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 diff --git a/wmpager/src/Makefile.am b/wmpager/src/Makefile.am new file mode 100644 index 0000000..4af9d4d --- /dev/null +++ b/wmpager/src/Makefile.am @@ -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@ diff --git a/wmpager/themes/Makefile.am b/wmpager/themes/Makefile.am new file mode 100644 index 0000000..ffeb4a7 --- /dev/null +++ b/wmpager/themes/Makefile.am @@ -0,0 +1,3 @@ +pkgdata_DATA = fire.xpm gray.xpm steel.xpm + +EXTRA_DIST = $(pkgdata_DATA)