SHA256
1
0
forked from pool/atinout

Accepting request 632363 from home:mnhauke

Initial package for atinout

OBS-URL: https://build.opensuse.org/request/show/632363
OBS-URL: https://build.opensuse.org/package/show/hardware/atinout?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2018-08-30 20:13:52 +00:00
committed by Git OBS Bridge
commit ce68035f70
6 changed files with 131 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
atinout-0.9.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d15c8288aca414e11cd304686b172696104c5e42bf776300311c005634854a2
size 24117

42
atinout-fix-build.patch Normal file
View File

@@ -0,0 +1,42 @@
diff --git a/Makefile b/Makefile
index 1daa431..c4525db 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
VERSION = 0.9.1
-PREFIX = /usr
+PREFIX ?= /usr
CC = gcc
-CFLAGS = -W -Wall -Wextra -Werror \
+CFLAGS += -W -Wall -Wextra -Werror \
-DVERSION=\"$(VERSION)\" \
-g
-LDFLAGS =
+LDFLAGS ?=
all: atinout
diff --git a/atinout.c b/atinout.c
index 4801547..ae0444e 100644
--- a/atinout.c
+++ b/atinout.c
@@ -141,7 +141,7 @@ static bool is_final_result(const char * const response)
if (strcmp(&response[1], "K\r\n") == 0) {
return true;
}
- /* no break */
+ // fallthrough
default:
return false;
}
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
help(argv[0]);
return EXIT_SUCCESS;
case 'V':
- printf("atinout version " VERSION "\n");
+ printf("atinout version %s \n", VERSION);
if (argc == 2) {
printf("Copyright (C) 2013 Håkon Løvdal <hlovdal@users.sourceforge.net>\n"
"This program comes with ABSOLUTELY NO WARRANTY.\n"

4
atinout.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Tue Aug 28 07:32:16 UTC 2018 - mardnh@gmx.de
- Initial package, version 0.9.1

58
atinout.spec Normal file
View File

@@ -0,0 +1,58 @@
#
# spec file for package atinout
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: atinout
Version: 0.9.1
Release: 0
Summary: Utility to communicate with modems via AT commands
License: GPL-3.0-or-later
Group: Hardware/Modem
URL: http://atinout.sourceforge.net
Source: http://sourceforge.net/projects/atinout/files/v%{version}/%{name}-%{version}.tar.gz
Patch0: atinout-fix-build.patch
%description
This program will read a file (or stdin) containing a list of AT
commands. Each command will be send to the modem, and all the response
for the command will be output to file (or stdout).
Example, to hang up an ongoing call:
$ echo ATH | atinout - /dev/ttyACM0 -
ATH
OK
$
%prep
%setup -q
%patch0 -p1
%build
export CFLAGS='%{optflags}'
make %{?_smp_mflags}
%install
%make_install
%files
%license gplv3.txt
%doc Changelog README
%{_bindir}/atinout
%{_mandir}/man1/atinout.1%{?ext_man}
%changelog