[amftools] Initial import (#907032)
Miro Hrončok
churchyard at fedoraproject.org
Thu Apr 25 12:52:06 UTC 2013
commit 8389efbfe6f5d6d6a1b2ec1c00d198c913630921
Author: Miro Hrončok <miro at hroncok.cz>
Date: Thu Apr 25 14:51:24 2013 +0200
Initial import (#907032)
.gitignore | 1 +
amftools-Makefile | 52 +++++++++++++++++++++++++++++++++++++++++
amftools.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 120 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..af0f2cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/amftools-svn32.tar.gz
diff --git a/amftools-Makefile b/amftools-Makefile
new file mode 100644
index 0000000..e121ef7
--- /dev/null
+++ b/amftools-Makefile
@@ -0,0 +1,52 @@
+CXX = g++
+CFLAGS = -O2 -g -pipe -Wall
+
+LIBS = -lGL -lzip -lstbi -lmuparser
+
+INCLUDE = -Iinclude \
+ -DLINUX \
+
+TARGETS = \
+ Amf \
+ AMF_File \
+ Equation \
+ Mesh \
+ MeshSlice \
+ MeshTree \
+ nAmf \
+ nColor \
+ nComposite \
+ nConstellation \
+ nCoordinates \
+ nEdge \
+ nInstance \
+ nMaterial \
+ nMesh \
+ nMetadata \
+ nNormal \
+ nObject \
+ nTexmap \
+ nTexture \
+ nTriangle \
+ nVertex \
+ nVertices \
+ nVolume \
+ SimpleImage \
+ STL_File \
+ XmlCompress \
+ XmlStream \
+ X3D_File \
+
+all: libamf.so.0.0
+
+libamf.so.0.0: $(patsubst %,bin/%.o, $(TARGETS))
+ $(CXX) $(CFLAGS) -shared -Wl,-soname,libamf.so.0 $^ $(LIBS) -o $@
+
+bin/Mes%.o: src/Mes%.cpp
+ $(CXX) $(CFLAGS) $(INCLUDE) -DUSE_OPEN_GL -c -fPIC $< -o $@
+
+bin/%.o: src/%.cpp
+ $(CXX) $(CFLAGS) $(INCLUDE) -c -fPIC $< -o $@
+
+clean:
+ rm -rf bin/* libamf.so.0.0
diff --git a/amftools.spec b/amftools.spec
new file mode 100644
index 0000000..a267f5b
--- /dev/null
+++ b/amftools.spec
@@ -0,0 +1,66 @@
+Name: amftools
+Version: 0.0
+%global svn svn32
+%global snapshot 20121220%{svn}
+Release: 2.%{snapshot}%{?dist}
+Summary: AMF file library
+# License is in files
+License: LGPLv3+
+URL: https://sourceforge.net/projects/%{name}/
+# svn export svn://svn.code.sf.net/p/%%{name}/code/trunk %%{name}
+# tar -pczf %%{name}-%%{svn}.tar.gz %%{name}
+Source0: %{name}-%{svn}.tar.gz
+Source1: %{name}-Makefile
+BuildRequires: mesa-libGL-devel, libzip-devel, muParser-devel, stbi-devel, rapidxml-devel
+
+%description
+C++ tools for implementing AMF file format for the interchange of geometry
+for 3D printing (additive manufacturing).
+
+%package devel
+Summary: AMF tools development files
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for AMF tools.
+
+%prep
+%setup -qn %{name}
+cp %{SOURCE1} Makefile
+
+# Bundling
+rm -rf */muparser */stb_image include/rapidxml */zip
+sed -i 's|muparser/muParser.h|muParser.h|g' include/Equation.h
+sed -i 's|stb_image/stb_image.h|stb_image.h|g' src/SimpleImage.cpp
+sed -i 's|rapidxml/||g' include/XmlStream.h src/XmlStream.cpp
+
+%build
+make %{?_smp_mflags}
+
+%install
+install -Dpm0755 libamf.so.0.0 %{buildroot}%{_libdir}/libamf.so.0.0
+ln -s libamf.so.0.0 %{buildroot}%{_libdir}/libamf.so.0
+ln -s libamf.so.0.0 %{buildroot}%{_libdir}/libamf.so
+mkdir -p %{buildroot}%{_includedir}
+cp -arp include %{buildroot}%{_includedir}/amf
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libamf.so.*
+
+%files devel
+%{_libdir}/libamf.so
+%{_includedir}/amf
+
+%changelog
+* Wed Apr 24 2013 Miro Hrončok <mhroncok at redhat.com> - 0.0-2.20121220svn32
+- Soname version 0.0.0 -> 0.0
+- Removing include/zip in %%prep, as it works fine
+- Added -lmuparser to Makefile
+
+* Fri Feb 01 2013 Miro Hrončok <mhroncok at redhat.com> - 0.0-1.20121220svn32
+- Started
+
diff --git a/sources b/sources
index e69de29..487ef3a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+763fd8830970e918682478c38f4c0a39 amftools-svn32.tar.gz
More information about the scm-commits
mailing list