Accepting request 351636 from home:mnhauke

initial package, version 2.0

OBS-URL: https://build.opensuse.org/request/show/351636
OBS-URL: https://build.opensuse.org/package/show/network:utilities/bittwist?expand=0&rev=1
This commit is contained in:
Marcus Meissner 2016-01-13 18:15:53 +00:00 committed by Git OBS Bridge
commit 73bc564703
6 changed files with 134 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

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b98123d2bcb9bec59dc5e610c0c5b5749ef2ed83418956c3ddef3cf5824ea45
size 40331

37
bittwist-makefile.diff Normal file
View File

@ -0,0 +1,37 @@
diff --git a/Makefile b/Makefile
index e681d85..f121fe3 100644
--- a/Makefile
+++ b/Makefile
@@ -19,22 +19,22 @@ INSTALL_DATA = ${INSTALL} -m 644
all: bittwist bittwiste
bittwist:
- $(CC) $(CFLAGS) $(SRC)/bittwist.c -o $(SRC)/bittwist -I/usr/local/include -L/usr/local/lib -lpcap
+ $(CC) $(CFLAGS) $(SRC)/bittwist.c -o $(SRC)/bittwist `pcap-config --libs --cflags`
bittwiste:
- $(CC) $(CFLAGS) $(SRC)/bittwiste.c -o $(SRC)/bittwiste -I/usr/local/include -L/usr/local/lib -lpcap
+ $(CC) $(CFLAGS) $(SRC)/bittwiste.c -o $(SRC)/bittwiste `pcap-config --libs --cflags`
clean:
rm -f $(SRC)/bittwist $(SRC)/bittwiste
install:
- mkdir -p $(bindir)
- chmod 755 $(bindir)
- $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwiste $(bindir)
- mkdir -p $(mandir)
- chmod 755 $(mandir)
- $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwiste.1 $(mandir)
+ mkdir -p $(DESTDIR)$(bindir)
+ chmod 755 $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwiste $(DESTDIR)$(bindir)
+ mkdir -p $(DESTDIR)$(mandir)
+ chmod 755 $(DESTDIR)$(mandir)
+ $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwiste.1 $(DESTDIR)$(mandir)
uninstall:
- rm -f $(bindir)/bittwist $(bindir)/bittwiste
- rm -f $(mandir)/bittwist.1 $(mandir)/bittwiste.1
+ rm -f $(bindir)/bittwist $(DESTDIR)$(bindir)/bittwiste
+ rm -f $(mandir)/bittwist.1 $(DESTDIR)$(mandir)/bittwiste.1

5
bittwist.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Sat Jan 2 12:34:50 UTC 2016 - mardnh@gmx.de
- initial package, version 2.0

65
bittwist.spec Normal file
View File

@ -0,0 +1,65 @@
#
# spec file for package bittwist
#
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#
Name: bittwist
Version: 2.0
Release: 0
Summary: A simple yet powerful libpcap-based Ethernet packet generator
License: GPL-2.0
Group: Productivity/Networking/Diagnostic
Url: http://bittwist.sourceforge.net/
Source: http://downloads.sourceforge.net/%{name}/Linux/Bit-Twist%%20%{version}/%{name}-linux-%{version}.tar.gz
Patch0: bittwist-makefile.diff
BuildRequires: libpcap-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Bit-Twist is a simple yet powerful libpcap-based Ethernet packet generator.
It is designed to complement tcpdump, which by itself has done a great job
at capturing network traffic.
With Bit-Twist, you can now regenerate your captured traffic onto a live
network!
Packets are generated from tcpdump trace file (.pcap file).
Bit-Twist also comes with a comprehensive trace file editor to allow you to
change the contents of a trace file.
Generally, packet generator is useful in simulating networking traffic or
scenario, testing firewall, IDS, and IPS, and troubleshooting various network
problems.
%prep
%setup -q -n %{name}-linux-%{version}
%patch0 -p1
perl -i -pe 's/\r\n/\n/gs' AUTHORS BUGS CHANGES COPYING README VERSION
%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
%make_install
%files
%defattr(-,root,root)
%doc AUTHORS BUGS CHANGES COPYING README VERSION
%{_bindir}/bittwist
%{_bindir}/bittwiste
%{_mandir}/man1/bittwist.1%{ext_man}
%{_mandir}/man1/bittwiste.1%{ext_man}
%changelog