aboutsummaryrefslogtreecommitdiffstats
path: root/capstone/packages
diff options
context:
space:
mode:
Diffstat (limited to 'capstone/packages')
-rw-r--r--capstone/packages/freebsd/ports/devel/capstone/Makefile23
-rw-r--r--capstone/packages/freebsd/ports/devel/capstone/pkg-descr17
-rw-r--r--capstone/packages/freebsd/ports/devel/capstone/pkg-plist14
-rw-r--r--capstone/packages/macports/devel/capstone/Portfile39
-rw-r--r--capstone/packages/macports/devel/capstone/files/patch-Makefile.diff17
-rw-r--r--capstone/packages/rpm/capstone.spec167
6 files changed, 277 insertions, 0 deletions
diff --git a/capstone/packages/freebsd/ports/devel/capstone/Makefile b/capstone/packages/freebsd/ports/devel/capstone/Makefile
new file mode 100644
index 000000000..8d457d9c2
--- /dev/null
+++ b/capstone/packages/freebsd/ports/devel/capstone/Makefile
@@ -0,0 +1,23 @@
+# $FreeBSD$
+
+PORTNAME= capstone
+PORTVERSION= 4.0.0
+CATEGORIES= devel
+MASTER_SITES= http://capstone-engine.org/download/${PORTVERSION}/
+
+MAINTAINER= oliver.pntr@gmail.com
+COMMENT= Multi-platform, multi-architecture disassembly framework
+
+LICENSE= BSD3CLAUSE
+
+USES= gmake
+USE_LDCONFIG= yes
+
+MAKE_ENV+= INSTALL_LIB="${INSTALL_LIB}" \
+ INSTALL_DATA="${INSTALL_DATA}"
+
+post-build:
+ # The pkgconfig file is generated and points to stagedir
+ ${REINPLACE_CMD} -e '/libdir/s|\(libdir=\)\(.*\)\(devel/capstone/work/stage\)|\1|g' ${WRKSRC}/capstone.pc
+
+.include <bsd.port.mk>
diff --git a/capstone/packages/freebsd/ports/devel/capstone/pkg-descr b/capstone/packages/freebsd/ports/devel/capstone/pkg-descr
new file mode 100644
index 000000000..3a88591d8
--- /dev/null
+++ b/capstone/packages/freebsd/ports/devel/capstone/pkg-descr
@@ -0,0 +1,17 @@
+Capstone is a lightweight multi-platform, multi-architecture disassembly
+framework.
+
+Features:
+ * Supported architectures: ARM, ARM64 (aka ARMv8), Mips, PowerPC, Sparc,
+ SystemZ, X86, X86_64 & XCore.
+ * Clean/simple/lightweight/intuitive architecture-neutral API
+ * Provide details on disassembled instruction (called "decomposer")
+ * Provide some semantics of the disassembled instruction, such as list of
+ implicit registers read & written.
+ * Implemented in pure C language, with bindings for Python, Ruby, C#, Java,
+ Javascript, GO, OCaml & Vala available.
+ * Native support for Windows & *nix (including MacOSX, Linux, *BSD & Solaris)
+ * Thread-safe by design
+ * Distributed under the open source BSD license
+
+WWW: http://capstone-engine.org/
diff --git a/capstone/packages/freebsd/ports/devel/capstone/pkg-plist b/capstone/packages/freebsd/ports/devel/capstone/pkg-plist
new file mode 100644
index 000000000..b4aab3c43
--- /dev/null
+++ b/capstone/packages/freebsd/ports/devel/capstone/pkg-plist
@@ -0,0 +1,14 @@
+include/capstone/arm.h
+include/capstone/arm64.h
+include/capstone/capstone.h
+include/capstone/mips.h
+include/capstone/ppc.h
+include/capstone/sparc.h
+include/capstone/systemz.h
+include/capstone/x86.h
+include/capstone/xcore.h
+include/capstone/platform.h
+lib/libcapstone.a
+lib/libcapstone.so
+libdata/pkgconfig/capstone.pc
+@dirrmtry include/capstone
diff --git a/capstone/packages/macports/devel/capstone/Portfile b/capstone/packages/macports/devel/capstone/Portfile
new file mode 100644
index 000000000..61af9a69f
--- /dev/null
+++ b/capstone/packages/macports/devel/capstone/Portfile
@@ -0,0 +1,39 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 118429 2014-04-02 07:44:35Z and.damore@macports.org $
+
+PortSystem 1.0
+
+name capstone
+version 3.0.1
+categories devel
+platforms darwin
+maintainers gmail.com:aquynh
+license BSD
+
+description Capstone disassembly engine
+
+long_description Capstone is a multi-arch, multi-platform disassembly framework with advanced features
+
+homepage http://www.capstone-engine.org/
+master_sites ${homepage}download/${version}/
+extract.suffix .tgz
+
+checksums sha256 38fc736830de83ae345d917a6c122e2a09119ec5724b553174ddf84062cf2551 \
+ rmd160 3da96a34fbdde07c2cbb57ed7a76a07c035bb920
+
+patchfiles patch-Makefile.diff
+
+variant universal {}
+
+use_configure no
+
+build.env CC=${configure.cc} \
+ CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+ LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" \
+ PREFIX=${prefix}
+
+eval destroot.env ${build.env}
+
+livecheck.type regex
+livecheck.url ${homepage}download.html
+livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}
diff --git a/capstone/packages/macports/devel/capstone/files/patch-Makefile.diff b/capstone/packages/macports/devel/capstone/files/patch-Makefile.diff
new file mode 100644
index 000000000..7a3f5cc50
--- /dev/null
+++ b/capstone/packages/macports/devel/capstone/files/patch-Makefile.diff
@@ -0,0 +1,17 @@
+--- Makefile
++++ Makefile
+@@ -246,14 +246,6 @@ EXT = dylib
+ VERSION_EXT = $(API_MAJOR).$(EXT)
+ $(LIBNAME)_LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
+ AR_EXT = a
+-# Homebrew wants to make sure its formula does not disable FORTIFY_SOURCE
+-# However, this is not really necessary because 'CAPSTONE_USE_SYS_DYN_MEM=yes' by default
+-ifneq ($(HOMEBREW_CAPSTONE),1)
+-ifneq ($(CAPSTONE_USE_SYS_DYN_MEM),yes)
+-# remove string check because OSX kernel complains about missing symbols
+-CFLAGS += -D_FORTIFY_SOURCE=0
+-endif
+-endif
+ else
+ $(LIBNAME)_LDFLAGS += -shared
+ # Cygwin?
diff --git a/capstone/packages/rpm/capstone.spec b/capstone/packages/rpm/capstone.spec
new file mode 100644
index 000000000..7486bd598
--- /dev/null
+++ b/capstone/packages/rpm/capstone.spec
@@ -0,0 +1,167 @@
+Name: capstone
+Version: 3.0.4
+Release: 2
+Summary: A lightweight multi-platform, multi-architecture disassembly framework
+
+License: BSD
+URL: http://www.capstone-engine.org/
+Source0: http://www.capstone-engine.org/download/%{version}/%{name}-%{version}.tar.gz
+
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+%global srcname distribute
+
+BuildRequires: python2-devel
+BuildRequires: jna
+BuildRequires: java-devel
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+%endif # if with_python3
+%global _hardened_build 1
+
+
+%description
+Capstone is a disassembly framework with the target of becoming the ultimate
+disasm engine for binary analysis and reversing in the security community.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%package python
+Summary: Python bindings for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description python
+The %{name}-python package contains python bindings for %{name}.
+
+%if 0%{?with_python3}
+%package python3
+Summary: Python3 bindings for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description python3
+The %{name}-python3 package contains python3 bindings for %{name}.
+%endif # with_python3
+
+%package java
+Summary: Java bindings for %{name}
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description java
+The %{name}-java package contains java bindings for %{name}.
+
+%prep
+%setup -q
+
+%build
+DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \
+LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" make %{?_smp_mflags}
+
+# Fix pkgconfig file
+sed -i 's;%{buildroot};;' capstone.pc
+grep -v archive capstone.pc > capstone.pc.tmp
+mv capstone.pc.tmp capstone.pc
+
+# build python bindings
+pushd bindings/python
+CFLAGS="%{optflags}" %{__python2} setup.py build
+%if 0%{?with_python3}
+CFLAGS="%{optflags}" %{__python3} setup.py build
+%endif # with_python3
+popd
+
+# build java bindings
+pushd bindings/java
+make CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken
+popd
+
+%install
+DESTDIR=%{buildroot} LIBDIRARCH=%{_lib} \
+INCDIR="%{_includedir}" make install
+find %{buildroot} -name '*.la' -exec rm -f {} ';'
+find %{buildroot} -name '*.a' -exec rm -f {} ';'
+
+# install python bindings
+pushd bindings/python
+%{__python2} setup.py install --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+%endif # with_python3
+popd
+
+# install java bindings
+install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
+
+%check
+ln -s libcapstone.so libcapstone.so.3
+make check LD_LIBRARY_PATH="`pwd`"
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+# %license does not work for RHEL<7
+%if 0%{?rhel} || 0%{?fedora} < 21
+%doc LICENSE.TXT LICENSE_LLVM.TXT
+%else
+%license LICENSE.TXT LICENSE_LLVM.TXT
+%endif # %license workarond for RHEL<7
+%doc README ChangeLog
+%{_libdir}/*.so.*
+
+%files devel
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*
+
+%files python
+%{python2_sitelib}/*egg-info
+%{python2_sitelib}/%{name}
+
+%if 0%{?with_python3}
+%files python3
+%{python3_sitelib}/*egg-info
+%{python3_sitelib}/%{name}
+%endif # _with_python3
+
+%files java
+%{_javadir}/
+
+%changelog
+* Thu Jul 16 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.4-2
+- Fix EPEL6 build problems
+
+* Wed Jul 15 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.4-1
+- new version 3.0.4. Includes security fixes.
+
+* Tue May 12 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.3-2
+- Addressed issues found during package review.
+
+* Fri May 08 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.3-1
+- Update to version 3.0.3
+
+* Fri May 08 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.2-3
+- Added python3 and hardened build support. Update java building.
+- Various cleanups.
+
+* Wed May 06 2015 Stefan Cornelius <scorneli@redhat.com> - 3.0.2-2
+- Update to 3.0.2. Fix 64bit issues. add %check.
+
+* Sat Sep 27 2014 Adel Gadllah <adel.gadllah@gmail.com> - 2.1.2-2
+- Addressed issues found during package review.
+
+* Mon May 19 2014 Adel Gadllah <adel.gadllah@gmail.com> - 2.1.2-1
+- Initial package