From 5b9bdba2ddc28d6ac033c578da1eefaaf69e2720 Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Jun 24 2014 13:36:06 +0000 Subject: Initial import (#1111602) --- diff --git a/.gitignore b/.gitignore index e69de29..02cd198 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/dhex_0.68.tar.gz diff --git a/dhex-0.68-build-fix.patch b/dhex-0.68-build-fix.patch new file mode 100644 index 0000000..2afc882 --- /dev/null +++ b/dhex-0.68-build-fix.patch @@ -0,0 +1,42 @@ +diff -up dhex_0.68/Makefile.orig dhex_0.68/Makefile +--- dhex_0.68/Makefile.orig 2012-09-09 19:03:55.000000000 +0200 ++++ dhex_0.68/Makefile 2014-06-20 17:09:18.488337251 +0200 +@@ -1,11 +1,15 @@ + CC= gcc +-LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/lib/ncurses -L/usr/local/lib/ncurses +-CPPFLAGS= -I/usr/include -I/usr/local/include -I/usr/include/ncurses -I/usr/local/include/ncurses +-CFLAGS= -O3 -Wall -std=c99 ++#LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/lib/ncurses -L/usr/local/lib/ncurses ++#CPPFLAGS= -I/usr/include -I/usr/local/include -I/usr/include/ncurses -I/usr/local/include/ncurses ++CPPFLAGS= $(shell pkg-config --cflags ncurses) ++CFLAGS= -O3 -Wall ++override CFLAGS += -std=c99 + #CFLAGS+= -ffunction-sections -fdata-sections + #LDFLAGS+= --gc-sections +-LIBS= -lncurses +-DESTDIR= /usr/local/ ++LIBS= $(shell pkg-config --libs ncurses || echo -lncurses) ++DESTDIR= /usr/local ++MANDIR= /man ++BINDIR= /bin + + OFILES=buffers.o \ + configfile.o \ +@@ -27,14 +31,9 @@ dhex: $(OFILES) + $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) + + install:all +- strip dhex +- cp dhex $(DESTDIR)/bin +- cp dhex.1 $(DESTDIR)/man/man1 +- cp dhexrc.5 $(DESTDIR)/man/man5 +- cp dhex_markers.5 $(DESTDIR)/man/man5 +- cp dhex_searchlog.5 $(DESTDIR)/man/man5 +- +- ++ install -Dpm 755 dhex $(DESTDIR)$(BINDIR) ++ install -Dpm 644 dhex.1 $(DESTDIR)$(MANDIR)/man1 ++ install -Dpm 644 -t $(DESTDIR)$(MANDIR)/man5 dhexrc.5 dhex_markers.5 dhex_searchlog.5 + + .c.o: + $(CC) $< -c -I. $(CPPFLAGS) $(CFLAGS) $(OPTIONS) diff --git a/dhex.spec b/dhex.spec new file mode 100644 index 0000000..d5a7671 --- /dev/null +++ b/dhex.spec @@ -0,0 +1,42 @@ +Summary: Ncurses based hexadecimal editor with a diff mode +Name: dhex +Version: 0.68 +Release: 2%{?dist} +License: GPLv2+ +Group: Applications/Editors +URL: http://www.dettus.net/dhex/ +Source: http://www.dettus.net/dhex/%{name}_%{version}.tar.gz +Patch0: dhex-0.68-build-fix.patch +BuildRequires: ncurses-devel + +%description +DHEX is a more than just another hex editor: It includes a diff mode, which +can be used to easily and conveniently compare two binary files. Since it is +based on ncurses and is themeable, it can run on any number of systems and +scenarios. With its utilization of search logs, it is possible to track +changes in different iterations of files easily. + +%prep +%setup -q -n %{name}_%{version} +%patch0 -p1 -b .build-fix + +%build +make %{?_smp_mflags} CFLAGS="%{optflags}" %{?__global_ldflags: LDFLAGS="%{__global_ldflags}"} + +%install +install -dD %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man{1,5} +make %{?_smp_mflags} DESTDIR=%{buildroot} BINDIR=%{_bindir} \ + MANDIR=%{_mandir} install + +%files +%doc README.txt gpl.txt todo.txt + +%{_bindir}/* +%{_mandir}/*/* + +%changelog +* Fri Jun 20 2014 Jaroslav Škarvada - 0.68-2 +- Various fixes according to review + +* Fri Jun 20 2014 Jaroslav Škarvada - 0.68-1 +- Initial release diff --git a/sources b/sources index e69de29..c83721b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5109b3d50053553e41d75c8e5c0a0175 dhex_0.68.tar.gz