diff --git a/.cvsignore b/.cvsignore index 2ffdddd..4056c08 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,36 @@ -.*.swp +*.da +*.lo +*.log +*.sddf +*.spec +.deps +.icons +.libs +Eterm*.tar.gz +Makefile +Makefile.in +aclocal.m4 +config.cache +config.guess +config.h +config.h.in +config.status +config.sub +configure +install-sh +lib*.la +libast*.tar.gz +libast-config +libast.spec +libtool +ltconfig +ltmain.sh +missing +mkinstalldirs +move-themes +spite +stamp-h +stamp-h* e16keyedit +e16keyedit*.gz +e16keyedit*.rpm diff --git a/Makefile b/Makefile deleted file mode 100644 index 6719eac..0000000 --- a/Makefile +++ /dev/null @@ -1,159 +0,0 @@ -# files in source that are needed -PACKAGE = e16-key-edit -VERSION = 0.0.0 -SRCS = \ - viewer.c menus.c ipc.c -HEADERS = \ - viewer.h menus.h -DATA = -EXTRAS = -BUILD = \ - -LIB_DIRS = \ - -L/usr/local/lib -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/dt/lib -LIBS = \ - `gtk-config --libs` -CFLAGS = \ - -O -g -D_GNU_SOURCE $(DEVFLAGS) -#CFLAGS = \ -# -O -g -W -Wall -Wno-unused -pedantic -pedantic-errors -ansi -D_GNU_SOURCE -OPTFLAGS = \ - -O2 -D_GNU_SOURCE -INCLUDES = \ - `gtk-config --cflags` -I.. - -BIN = e16keyedit - -# configurable stuff -BINARY_DESTINATION = /usr/local/enlightenment/bin -DATA_DESTINATION = /usr/local/enlightenment/share - -# commands to do things -INSTALL = install -MKDIR = mkdir -RM = rm -f -RMRF = rm -rf -TAR = tar -GZIP = gzip -CD = cd -MAKE = make -STRIP = strip -SED = sed -MAKEDEP = gcc -MM $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) $(EXTRA_INCLUDES) -#MAKEDEP = makedepend -f- -s'\# CUT' -- -Y $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) $(EXTRA_INCLUDES) -- - -# piece together variables -OBJS = $(SRCS:.c=.o) -DIST = $(PACKAGE)-$(VERSION) -BLD = Makefile $(BUILD) -FILES = $(SRCS) $(HEADERS) $(DATA) $(BLD) $(EXTRAS) - -all: e16keyedit - -# show help -help: - @echo - @echo -# @echo "To build and install type:" -# @echo " make [options] install" - @echo "To only build the binaries:" - @echo " make [options] e16keyedit" - @echo - @echo "Options for building (zero or more of the following):" - @echo " BINARY_DESTINATION=/path/to/binary/dir [default="$(BINARY_DESTINATION)"]" - @echo " DATA_DESTINATION=/path/to/data/dir [default="$(DATA_DESTINATION)"]" - @echo " CFLAGS=\"flags for compiler\" [default="$(CFLAGS)"]" - @echo " INCLUDES=\"include directiors compiler\" [default="$(INCLUDES)"]" - @echo " EXTRA_CFLAGS=\"extra flags for compiler\" [default="$(EXTRA_CFLAGS)"]" - @echo " EXTRA_INCLUDES=\"extra include directiors compiler\" [default="$(EXTRA_INCLUDES)"]" - @echo " LIBS=\"libraries to link to\" [default="$(LIBS)"]" - @echo " LIB_DIRS=\"directories to find libraries\" [default="$(LIB_DIRS)"]" - @echo " EXTRA_LIBS=\"extra libraries to link to\" [default="$(EXTRA_LIBS)"]" - @echo " EXTRA_LIB_DIRS=\"extra directories to find libraries\" [default="$(EXTRA_LIB_DIRS)"]" - @echo - @echo - -bigcompile: - $(CC) $(SRCS) -o e16keyedit $(OPTFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) $(EXTRA_INCLUDES) $(LIBS) $(EXTRA_LIBS) $(LIB_DIRS) $(EXTRA_LIB_DIRS) - $(STRIP) ./e16keyedit - -optimized: bigcompile - -# rules for source -e16keyedit: $(OBJS) - $(RM) $@ - $(CC) -o $@ $(OBJS) $(LIBS) $(EXTRA_LIBS) $(LIB_DIRS) $(EXTRA_LIB_DIRS) - -.c.o: - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) $(EXTRA_INCLUDES) -c $< -o $@ - -# clean out build crap -clean:: - $(RMRF) $(BIN) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut $(DIST) $(DIST).tar $(DIST).tar.gz ./=build ./=install "#"* - -# how to install -install:: e - @echo - @echo - @echo "You don't really want to do this. it doesn't work yet." - @echo - @echo -# for I in $(BIN); do $(INSTALL) -D -m 0775 $$I $(prefix)$(BINARY_DESTINATION)/$$I; done -# for I in $(DATA); do $(INSTALL) -D -m 0664 $$I $(prefix)$(DATA_DESTINATION)/$$I; done - -# how to make a dist tarball -dist:: - $(RMRF) $(DIST) $(DIST).tar $(DIST).tar.gz - $(MKDIR) $(DIST) - for I in $(FILES); do \ - if [ -x $$I ]; then $(INSTALL) -D -m 0775 $$I $(DIST)/$$I; else \ - if [ -f $$I ]; then $(INSTALL) -D -m 0664 $$I $(DIST)/$$I; else \ - if [ -d $$I ]; then $(INSTALL) -D -m 0555 -d $$I $(DIST)/$$I; fi; fi; fi; \ - done - $(TAR) -cf $(DIST).tar $(DIST) - $(GZIP) $(DIST).tar - $(RMRF) $(DIST) - -# how to check the dist -distcheck: dist - $(RMRF) ./=build ./=install - $(MKDIR) ./=build - $(MKDIR) ./=install - ($(CD) ./=build; $(GZIP) -d -c ../$(DIST).tar.gz | $(TAR) xvf -;) - ($(CD) ./=build/$(PACKAGE)-$(VERSION); \ - $(MAKE) prefix=../../=install install) - $(RMRF) ./=build ./=install $(DIST).tar.gz - -# Update dependency info -dep depend: - $(SED) '/^# CUT/,$$d' Makefile > Makefile.tmp - echo "# CUT" >> Makefile.tmp - $(MAKEDEP) $(SRCS) >> Makefile.tmp && mv Makefile.tmp Makefile - -# File dependencies. Do not remove the next line. sed needs it. -# CUT -batch.o: batch.c batch.h events.h x.h ev_filter.h str.h mem.h util.h \ - file.h -db.o: db.c db.h mem.h util.h str.h -efm_view.o: efm_view.c x.h str.h mem.h util.h file.h events.h ev_x.h \ - ev_filter.h efm_view.h db.h im_engine.h batch.h glob.h -ev_dispatch.o: ev_dispatch.c ev_dispatch.h events.h x.h str.h mem.h \ - util.h -ev_filter.o: ev_filter.c ev_filter.h events.h x.h str.h mem.h util.h -ev_ipc.o: ev_ipc.c events.h x.h ev_ipc.h str.h mem.h util.h file.h -ev_session.o: ev_session.c str.h mem.h util.h -ev_signal.o: ev_signal.c events.h x.h ev_signal.h str.h mem.h util.h -ev_x.o: ev_x.c events.h x.h ev_x.h str.h mem.h util.h -events.o: events.c events.h x.h ev_filter.h str.h mem.h util.h -file.o: file.c file.h mem.h str.h events.h x.h db.h glob.h ev_ipc.h \ - jobs.h util.h -glob.o: glob.c str.h glob.h -im_engine.o: im_engine.c util.h mem.h str.h x.h events.h ev_x.h \ - im_engine.h db.h -jobs.o: jobs.c jobs.h -main.o: main.c events.h x.h ev_signal.h ev_x.h ev_ipc.h ev_filter.h \ - batch.h efm_view.h file.h db.h im_engine.h mem.h util.h str.h -mem.o: mem.c mem.h -str.o: str.c str.h mem.h -util.o: util.c util.h mem.h str.h -x.o: x.c x.h mem.h str.h diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e39e89e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,6 @@ +AUTOMAKE_OPTIONS=foreign + +bin_PROGRAMS = e16keyedit + +e16keyedit_SOURCES = ipc.c ipc.h menus.c menus.h viewer.c viewer.h + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..9385192 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +# $Id$ + +broken() { + echo + echo "You need libtool, autoconf, and automake. Install them" + echo "and try again. Get source at ftp://ftp.gnu.org/pub/gnu/" + echo "ERROR: $1 not found." + exit -1 +} + +DIE=0 + +echo "Generating build files, please wait...." + +AUTOHEADER_CHOICES="$AUTOHEADER autoheader213 autoheader-2.13 autoheader" +ACLOCAL_CHOICES="$ACLOCAL aclocal14 aclocal-1.4 aclocal" +AUTOMAKE_CHOICES="$AUTOMAKE automake14 automake-1.4 automake" +AUTOCONF_CHOICES="$AUTOCONF autoconf213 autoconf-2.13 autoconf" + +for i in $AUTOHEADER_CHOICES ; do + $i --version /dev/null 2>&1 && AUTOHEADER=$i && break +done +[ "x$AUTOHEADER" = "x" ] && broken autoconf + +for i in $ACLOCAL_CHOICES ; do + $i --version /dev/null 2>&1 && ACLOCAL=$i && break +done +[ "x$ACLOCAL" = "x" ] && broken automake + +for i in $AUTOMAKE_CHOICES ; do + $i --version /dev/null 2>&1 && AUTOMAKE=$i && break +done +[ "x$AUTOMAKE" = "x" ] && broken automake + +for i in $AUTOCONF_CHOICES ; do + $i --version /dev/null 2>&1 && AUTOCONF=$i && break +done +[ "x$AUTOCONF" = "x" ] && broken autoconf + +# Export them so configure can AC_SUBST() them. +export AUTOHEADER ACLOCAL AUTOMAKE AUTOCONF + +# Check for existing libast.m4 we can use. Use the local one if not. +if test ! -f "`$ACLOCAL --print-ac-dir`/libast.m4"; then + ACLOCAL_FLAGS="-I . $ACLOCAL_FLAGS" +fi + +# Run the stuff. +(set -x && $AUTOHEADER) +(set -x && $ACLOCAL $ACLOCAL_FLAGS) +(set -x && $AUTOMAKE -a -c) +(set -x && $AUTOCONF) + +# Run configure. +./configure "$@" diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..020ca31 --- /dev/null +++ b/configure.in @@ -0,0 +1,28 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(ipc.c) +AM_INIT_AUTOMAKE(e16keyedit, 0.1.0) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +dnl Checks for libraries. +if !(gtk-config --version >/dev/null 2>&1); then + AC_MSG_ERROR([Gtk+ is required.]) +else + CFLAGS="$CFLAGS `gtk-config --cflags`" + LIBS="$LIBS `gtk-config --libs`" +fi + +dnl Checks for header files. +AC_PATH_X +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. + +dnl Checks for library functions. + +AC_OUTPUT(Makefile) diff --git a/e16keyedit.spec b/e16keyedit.spec new file mode 100644 index 0000000..d466759 --- /dev/null +++ b/e16keyedit.spec @@ -0,0 +1,48 @@ +Summary: GUI Tool for Editing Enlightenment 0.16.x Keybindings +Name: e16keyedit +Version: 0.1.0 +Release: 1%{?_vendorsuffix:.%{_vendorsuffix}} +Copyright: BSD-like +Group: User Interface/Desktops +Source: %{name}-%{version}.tar.gz +Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings } +Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:Enlightenment (http://www.enlightenment/org/)} +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:any} +BuildRequires: /usr/bin/gtk-config +#BuildSuggests: gtk-devel +Prefix: %{_prefix} +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root + +%description +e16keyedit provides a graphical interface for managing keybindings in +Enlightenment 0.16.x. + +NOTE: This tool uses Enlightenment IPC and does not edit any config + files. So be sure to restart E after you finish! + +%prep +%setup -q + +%build +CFLAGS="%{?cflags:%{cflags}}%{!?cflags:$RPM_OPT_FLAGS}" +CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cflags:$RPM_OPT_FLAGS}" +export CFLAGS CXXFLAGS + +%configure %{?acflags} --prefix=%{_prefix} +%{__make} %{?_smp_mflags} %{?mflags} + +%install +%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install} + +%clean +test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%doc README COPYING AUTHORS ChangeLog +%{_bindir}/%{name} + +%changelog +* Tue Jul 20 2004 Mezzanine +- Specfile auto-generated by Mezzanine +