From: Maciej Wereski Date: Thu, 8 Aug 2013 13:00:38 +0000 (+0200) Subject: Add packaging, do not strip binaries, fix paths X-Git-Tag: accepted/tizen/3.0.m2/mobile/20170105.025605^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_mobile;p=platform%2Fupstream%2Fvi.git Add packaging, do not strip binaries, fix paths Change-Id: Id57f35546ed13e370197e2e6fa5476c457ad255c Signed-off-by: Maciej Wereski --- diff --git a/Makefile b/Makefile index b3e01ea..b18699f 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ # Destinations for installation. $(PRESERVEDIR) is used for recovery files. # It will get mode 1777. # -PREFIX = /usr/local +PREFIX = /usr BINDIR = $(PREFIX)/bin LIBEXECDIR = $(PREFIX)/libexec MANDIR = $(PREFIX)/share/man @@ -94,7 +94,7 @@ DESTDIR = # # A BSD-like install program. GNU install will fit well here, too. # -INSTALL = /usr/ucb/install +INSTALL = /usr/bin/install # # Compiler and linker flags. @@ -235,7 +235,7 @@ MALLOC=mapmalloc.o #WARN = -Wall -Wno-parentheses -Werror -STRIP = -s +STRIP = RECOVER = -DEXRECOVER=\"$(LIBEXECDIR)/exrecover\" \ -DEXPRESERVE=\"$(LIBEXECDIR)/expreserve\" CCFLAGS = $(CFLAGS) $(WARN) $(CPPFLAGS) $(FEATURES) $(CHARSET) $(OSTYPE) \ diff --git a/packaging/vi.manifest b/packaging/vi.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/vi.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/vi.spec b/packaging/vi.spec new file mode 100644 index 0000000..c71fe57 --- /dev/null +++ b/packaging/vi.spec @@ -0,0 +1,53 @@ +Name: vi +Version: 050325 +Release: 1 +License: BSD-4-Clause-UC and BSD-4-Clause-Caldera + +Summary: The Traditional Vi + +Url: http://ex-vi.sourceforge.net/ +Group: Base/Utilities +Source: http://prdownloads.sourceforge.net/ex-vi/ex-%{version}.tar.bz2 +Source1: vi.manifest +BuildRequires: gcc +BuildRequires: make +BuildRequires: glibc-devel >= 2.2.2 +BuildRequires: ncurses-devel +Conflicts: vim-base + +%description +Compared to most of its many clones, the traditional vi is a rather small +program just with its extremely powerful editing interface, but lacking fancy +features like multiple undo, multiple screens, or syntax highlighting. +This port of vi has generally preserved the original style, terminal control, +and feature set. It adds support for international character sets, including +multibyte encodings such as UTF-8, and some minor enhancements that were not +present in BSD vi 3.7, but had been included in later vi versions for System V +or in POSIX.2. + +%prep +%setup -q -n ex-%{version} + +cp %{SOURCE1} . + +%build +export CFLAGS="%{optflags} -Wall -pipe -fno-strict-aliasing" +export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1} + +make + +%install +%make_install + +rm -Rf %{buildroot}%{_mandir} + +%files +%defattr(-,root,root,-) +%manifest vi.manifest +%{_bindir}/edit +%{_bindir}/ex +%{_bindir}/vedit +%{_bindir}/vi +%{_bindir}/view +%{_libexecdir}/expreserve +%{_libexecdir}/exrecover