[nbc] Patch build system so it doesn't gzip manpage Preserve manpage timestamp Preserve timestamps in dos2
rmattes
rmattes at fedoraproject.org
Thu Jul 21 05:07:42 UTC 2011
commit df64f473918755915c3ab56feb345d2828e8059f
Author: Rich Mattes <richmattes at gmail.com>
Date: Thu Jul 21 01:07:26 2011 -0400
Patch build system so it doesn't gzip manpage
Preserve manpage timestamp
Preserve timestamps in dos2unix call
Add smp_mflags
.gitignore | 1 +
nbc-1.2.1.r3.fixinstall.patch | 23 +++++++++++++
nbc.spec | 70 +++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..83c3aad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nbc-1.2.1.r3.src.tgz
diff --git a/nbc-1.2.1.r3.fixinstall.patch b/nbc-1.2.1.r3.fixinstall.patch
new file mode 100644
index 0000000..a7e95eb
--- /dev/null
+++ b/nbc-1.2.1.r3.fixinstall.patch
@@ -0,0 +1,23 @@
+diff -up ./Makefile.fixinstall ./Makefile
+--- ./Makefile.fixinstall 2011-03-01 21:16:01.486580002 -0500
++++ ./Makefile 2011-03-01 21:27:48.920579851 -0500
+@@ -10,4 +10,4 @@ realclean:
+
+ install:
+ cd NXT && make install
+- gzip -9 doc/nbc.1 && install -m 644 doc/nbc.1.gz $(DISTDIR)$(SHARE)/man/man1 && gzip -d doc/nbc.1.gz
++ install -p -D -m 644 doc/nbc.1 $(DISTDIR)$(SHARE)/man/man1/nbc.1
+diff -up ./NXT/Makefile.fixinstall ./NXT/Makefile
+--- ./NXT/Makefile.fixinstall 2011-03-01 21:16:35.064579990 -0500
++++ ./NXT/Makefile 2011-03-01 21:16:45.500579295 -0500
+@@ -12,8 +12,9 @@ realclean:: clean
+ rm -f $(PROGRAMS) mkdata NBCCommonData.pas NXTDefsData.pas NXCDefsData.pas
+
+ install:: all
++ install -D -m 755 nbc $(DISTDIR)/usr/bin/nbc
+
+-PFLAGS=-S2cdghi -dRELEASE -vewnhi -l -Fu../ -Fu. -Fu../bricktools -dCAN_DOWNLOAD
++PFLAGS=-S2cdghi -dRELEASE -vewnhi -g -l -Fu../ -Fu. -Fu../bricktools -dCAN_DOWNLOAD
+
+
+ # PTOOLPREFIX may differ on different platforms (e.g. /usr/local/bin/)
diff --git a/nbc.spec b/nbc.spec
new file mode 100644
index 0000000..de22359
--- /dev/null
+++ b/nbc.spec
@@ -0,0 +1,70 @@
+Name: nbc
+Version: 1.2.1.r3
+Release: 3%{?dist}
+Summary: Simple language and compiler to program the LEGO NXT brick
+URL: http://bricxcc.sourceforge.net/nbc/
+Group: Development/Languages
+License: MPLv1.1
+Source0: http://downloads.sourceforge.net/bricxcc/%{name}-%{version}.src.tgz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# This patch fixes the installation paths for the binary and manpage,
+# and adds a -g to the Pascal buildflags so a debuginfo package
+# can be generated. Not yet submitted upstream
+Patch0: %{name}-1.2.1.r3.fixinstall.patch
+
+BuildRequires: fpc
+BuildRequires: libusb-devel
+BuildRequires: dos2unix
+
+%description
+Next Byte Codes (NBC) is a simple language with an assembly language
+syntax that can be used to program LEGO's NXT programmable brick
+(from the new LEGO Mindstorms NXT set).
+
+Not Exactly C (NXC) is a high level language, similar to C, built on
+top of the NBC compiler. It can also be used to program the NXT brick.
+NXC is basically NQC (Not Quite C) for the NXT.
+
+%prep
+%setup -c -q
+%patch0 -p0 -b .fixinstall
+
+cd doc
+for f in Readme Changelog; do
+ dos2unix -n $f $f.tmp && \
+ touch -r $f $f.tmp && \
+ mv $f.tmp $f
+done
+
+%build
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DISTDIR=%{buildroot}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc doc/Changelog doc/Readme
+%{_bindir}/nbc
+%{_mandir}/man1/nbc.1*
+
+%changelog
+* Tue Mar 01 2011 Rich Mattes <richmattes at gmail.com> - 1.2.1.r3-3
+- Patch build system so it doesn't gzip manpage
+- Preserve manpage timestamp
+- Preserve timestamps in dos2unix call
+- Add smp_mflags
+
+* Sun Jan 09 2011 Rich Mattes <richmattes at gmail.com> - 1.2.1.r3-2
+- Fixed manpage installation
+- Added -g to build flags to generate debuginfo
+- Fixed typos in specfile
+
+* Thu Dec 30 2010 Martin Langhoff <martin at laptop.org> - 1.2.1.r3-1
+- Initial package
+
diff --git a/sources b/sources
index e69de29..2b82793 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a640a5d74407ed976d6a1c565276bc6a nbc-1.2.1.r3.src.tgz
More information about the scm-commits
mailing list