--- /dev/null
+AM_CPPFLAGS = -DSCRIPTDIR=\"${pkgdatadir}/\"
+
+bin_PROGRAMS = comgt
+comgt_SOURCES = comgt.c
+man_MANS = comgt.1 sigmon.1
+pkgdata_DATA = scripts/*
--- /dev/null
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.62)
+AC_INIT([comgt], [0.32])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([comgt.h])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/time.h termio.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([getcwd gettimeofday putenv select setenv])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
--- /dev/null
+--- o.comgt.0.32/comgt.c 2006-10-20 16:49:46.000000000 +0200
++++ n.comgt.0.32/comgt.c 2008-08-30 22:20:16.000000000 +0200
+@@ -54,6 +54,9 @@
+ #define BOOL unsigned char
+ #define NVARS 286 /* a-z, a0-z9 == 26*11 */
+
++#ifndef SCRIPTDIR
++#define SCRIPTDIR "/usr/local/share/comgt/"
++#endif
+
+ extern char *optarg;
+ extern int optind, opterr;
+@@ -1642,7 +1645,7 @@
+ //scriptfile[0] = '\0';
+ }
+ if((fp=fopen(scriptfile,"r"))==NULL) {
+- strcpy(scriptfilepath,"/etc/comgt/");
++ strcpy(scriptfilepath,SCRIPTDIR);
+ strcat(scriptfilepath,scriptfile);
+ if((fp=fopen(scriptfilepath,"r"))==NULL) {
+ sprintf(msg,"Could not open scriptfile \"%s\".\n",scriptfile);
+--- o.comgt.0.32/comgt.1 2006-10-20 16:49:46.000000000 +0200
++++ n.comgt.0.32/comgt.1 2008-08-30 23:21:13.000000000 +0200
+@@ -115,7 +115,7 @@
+ and will work for serially connected modems, built-in modems, PCMCIA modems
+ as well as the GlobeTrotter GPRS and the Vodafone 3G/GPRS datacards.
+ .
+-There is a search priority order for scripts - 1)internal, 2)working directory, 3)/etc/comgt
++There is a search priority order for scripts - 1)internal, 2)working directory, 3)/usr/share/comgt
+ .PP
+ .SS Built-in scripts
+
--- /dev/null
+Summary: Controlling, configuring and interacting with Option Wireless 3G and 2G (HSDPA, UMTS, EDGE, GPRS, GSM) data devices
+#Summary(pl.UTF-8):
+Name: comgt
+Version: 0.32
+Release: 1
+License: GPL v2
+Group: Utilities
+Source0: http://dl.sourceforge.net/comgt/%{name}.%{version}.tgz
+# Source0-md5: db2452680c3d953631299e331daf49ef
+Source1: %{name}-configure.ac
+Source2: %{name}-Makefile.am
+Patch0: %{name}-scriptdir.patch
+URL: http://sourceforge.net/projects/comgt
+BuildRequires: autoconf >= 2.62
+BuildRequires: automake
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Comgt is a command line tool for controlling, configuring and
+interacting with Option Wireless 3G and 2G ( HSDPA, UMTS, EDGE, GPRS,
+GSM) data devices within the Linux environment.
+
+#description -l pl.UTF-8
+
+%prep
+%setup -q -n %{name}.%{version}
+%patch0 -p1
+cp -f %{SOURCE1} configure.ac
+cp -f %{SOURCE2} Makefile.am
+
+%build
+touch NEWS README AUTHORS ChangeLog
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG gprs.txt TODO umts.txt
+%attr(755,root,root) %{_bindir}/*
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*
+%{_mandir}/man1/*.1*