Jerry James 575c8c7
# Upstream doesn't make releases.  We have to check the code out of Mercurial.
Jerry James 575c8c7
%global owner   alanmi
a19d415
%global commit  8e08604f8ad3
a19d415
%global hgdate  20160905
a19d415
a19d415
# WARNING: When updating to a newer snapshot, because upstream doesn't do
a19d415
# shared library versioning, run abipkgdiff (from libabigail) against the
a19d415
# old and new binary and debuginfo packages to detect abi changes that would
a19d415
# require bumping the shared library version, e.g.,
a19d415
#   abipkgdiff --d1 abc-debuginfo-<old>.rpm --d2 abc-debuginfo-<new>.rpm \
a19d415
#               abc-<old>.rpm abc-<new>.rpm
a19d415
# If the shared library version is bumped, remember to rebuild dependent
a19d415
# packages, finding them using e.g.
a19d415
#   repoquery --whatrequires abc-libs
a19d415
# This should be done for each branch in which abc-libs will be updated.
Jerry James 575c8c7
Jerry James 575c8c7
Name:           abc
Jerry James 575c8c7
Version:        1.01
bdb2560
Release:        13.hg%{hgdate}%{?dist}
Jerry James 575c8c7
Summary:        Sequential logic synthesis and formal verification
Jerry James 575c8c7
744413f
License:        MIT
Jerry James 575c8c7
URL:            http://www.eecs.berkeley.edu/~alanmi/abc/abc.htm
Jerry James 575c8c7
Source0:        https://bitbucket.org/%{owner}/%{name}/get/%{commit}.zip
Jerry James 575c8c7
# Man page created by Jerry James using upstream text; hence, it is covered by
Jerry James 575c8c7
# the same copyright and license as the code.
Jerry James 575c8c7
Source1:        %{name}.1
Jerry James 575c8c7
# Fedora-specific patch: do not use the bundled libraries
Jerry James 575c8c7
Patch0:         %{name}-bundlelib.patch
Jerry James 575c8c7
# Fedora-specific patch: build a shared library instead of a static library
Jerry James 575c8c7
Patch1:         %{name}-sharedlib.patch
Jerry James 575c8c7
Jerry James 575c8c7
BuildRequires:  bzip2-devel
8509331
BuildRequires:  gcc
Jerry James 575c8c7
BuildRequires:  readline-devel
Jerry James 575c8c7
BuildRequires:  zlib-devel
Jerry James 575c8c7
Jerry James 575c8c7
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Jerry James 575c8c7
Jerry James 575c8c7
%description
Jerry James 575c8c7
ABC is a growing software system for synthesis and verification of
Jerry James 575c8c7
binary sequential logic circuits appearing in synchronous hardware
Jerry James 575c8c7
designs.  ABC combines scalable logic optimization based on And-Inverter
Jerry James 575c8c7
Graphs (AIGs), optimal-delay DAG-based technology mapping for look-up
Jerry James 575c8c7
tables and standard cells, and innovative algorithms for sequential
Jerry James 575c8c7
synthesis and verification.
Jerry James 575c8c7
Jerry James 575c8c7
ABC provides an experimental implementation of these algorithms and a
Jerry James 575c8c7
programming environment for building similar applications.  Future
Jerry James 575c8c7
development will focus on improving the algorithms and making most of
Jerry James 575c8c7
the packages stand-alone.  This will allow the user to customize ABC for
Jerry James 575c8c7
their needs as if it were a toolbox rather than a complete tool.
Jerry James 575c8c7
Jerry James 575c8c7
%package libs
Jerry James 575c8c7
Summary:        Library for sequential synthesis and verification
Jerry James 575c8c7
Jerry James 575c8c7
%description libs
Jerry James 575c8c7
This package contains the core functionality of ABC as a shared library.
Jerry James 575c8c7
Jerry James 575c8c7
%package devel
Jerry James 575c8c7
Summary:        Headers and libraries for developing with ABC
Jerry James 575c8c7
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Jerry James 575c8c7
Jerry James 575c8c7
%description devel
Jerry James 575c8c7
Headers and libraries for developing applications that use ABC.
Jerry James 575c8c7
Jerry James 575c8c7
%prep
744413f
%setup -q -n %{owner}-%{name}-%{commit}
Jerry James 575c8c7
%patch0
Jerry James 575c8c7
%patch1
Jerry James 575c8c7
Jerry James 575c8c7
# Do not use the bundled libraries
Jerry James 575c8c7
rm -fr lib src/misc/{bzlib,zlib} src/sat/bsat2
Jerry James 575c8c7
Jerry James 575c8c7
# Fix end of line encodings
Jerry James 575c8c7
for fil in readme.md readmeaig; do
Jerry James 575c8c7
  sed -i.orig 's/\r//' ${fil}
Jerry James 575c8c7
  touch -r ${fil}.orig ${fil}
Jerry James 575c8c7
  rm -f ${fil}.orig
Jerry James 575c8c7
done
Jerry James 575c8c7
Jerry James 575c8c7
# Set the version number in the man page
Jerry James 575c8c7
sed 's/@VERSION@/%{version} (%{hgdate})/' %{SOURCE1} > %{name}.1
Jerry James 575c8c7
touch -r %{SOURCE1} %{name}.1
Jerry James 575c8c7
Jerry James 575c8c7
%build
Jerry James 575c8c7
# Build the library and binary
Jerry James 575c8c7
make %{?_smp_mflags} libabc.so OPTFLAGS="%{optflags} -fPIC -DNDEBUG" \
744413f
  LD="g++ $RPM_LD_FLAGS" ABC_MAKE_VERBOSE=1
a19d415
g++ src/base/main/main.o -o %{name} $RPM_LD_FLAGS -L. -labc
Jerry James 575c8c7
Jerry James 575c8c7
%install
Jerry James 575c8c7
# Install the library
Jerry James 575c8c7
mkdir -p %{buildroot}%{_libdir}
Jerry James 575c8c7
install -p -m 0755 lib%{name}.so.0.0.0 %{buildroot}%{_libdir}
Jerry James 575c8c7
ln -s lib%{name}.so.0.0.0 %{buildroot}%{_libdir}/lib%{name}.so.0
Jerry James 575c8c7
ln -s lib%{name}.so.0 %{buildroot}%{_libdir}/lib%{name}.so
Jerry James 575c8c7
Jerry James 575c8c7
# Install the header files
270dae4
pushd src
Jerry James 575c8c7
mkdir -p %{buildroot}%{_includedir}/%{name}
270dae4
tar -cBf - $(find -O3 . -name \*.h) | \
270dae4
  (cd %{buildroot}%{_includedir}/%{name}; tar -xBf -)
270dae4
popd
Jerry James 575c8c7
Jerry James 575c8c7
# Install the binary
Jerry James 575c8c7
mkdir -p %{buildroot}%{_bindir}
Jerry James 575c8c7
install -p -m 0755 %{name} %{buildroot}%{_bindir}
Jerry James 575c8c7
Jerry James 575c8c7
# Install the man page
Jerry James 575c8c7
mkdir -p %{buildroot}%{_mandir}/man1
Jerry James 575c8c7
install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1
Jerry James 575c8c7
Jerry James 575c8c7
%post libs -p /sbin/ldconfig
Jerry James 575c8c7
Jerry James 575c8c7
%postun libs -p /sbin/ldconfig
Jerry James 575c8c7
Jerry James 575c8c7
%files
744413f
%doc readme.md readmeaig
Jerry James 575c8c7
%{_bindir}/%{name}
Jerry James 575c8c7
%{_mandir}/man1/%{name}*
Jerry James 575c8c7
Jerry James 575c8c7
%files libs
744413f
%license copyright.txt
Jerry James 575c8c7
%{_libdir}/lib%{name}.so.*
Jerry James 575c8c7
Jerry James 575c8c7
%files devel
Jerry James 575c8c7
%{_includedir}/%{name}/
Jerry James 575c8c7
%{_libdir}/lib%{name}.so
Jerry James 575c8c7
Jerry James 575c8c7
%changelog
bdb2560
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-13.hg20160905
bdb2560
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
bdb2560
9747621
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-12.hg20160905
9747621
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9747621
c0db3ac
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-11.hg20160905
c0db3ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c0db3ac
Igor Gnatenko 8856bd4
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.01-10.hg20160905
Igor Gnatenko 8856bd4
- Rebuild for readline 7.x
Igor Gnatenko 8856bd4
a19d415
* Sat Sep 10 2016 Eric Smith <brouhaha@fedoraproject.org> - 1.01-9.hg20160905
a19d415
- Update to latest mercurial snapshot
a19d415
744413f
* Fri Feb  5 2016 Jerry James <loganjerry@gmail.com> - 1.01-8.hg20160203
744413f
- Update to latest mercurial snapshot
744413f
- Drop the python2 subpackage; upstream moved support to a separate project
744413f
4740505
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-7.hg20150306
4740505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4740505
aeaff1f
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-6.hg20150306
aeaff1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
aeaff1f
e28c8ed
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.01-5.hg20150306
e28c8ed
- Rebuilt for GCC 5 C++11 ABI change
e28c8ed
0adf615
* Sat Mar  7 2015 Jerry James <loganjerry@gmail.com> - 1.01-4.hg20150306
0adf615
- Update to latest mercurial snapshot
0adf615
270dae4
* Thu Jan  1 2015 Jerry James <loganjerry@gmail.com> - 1.01-3.hg20150101
270dae4
- Update to latest mercurial snapshot
270dae4
- Fix installation of header files
270dae4
Jerry James 575c8c7
* Wed Dec  3 2014 Jerry James <loganjerry@gmail.com> - 1.01-2.hg20141130
Jerry James 575c8c7
- Drop unnecessary jquery Provides
Jerry James 575c8c7
- Fix file permissions
Jerry James 575c8c7
Jerry James 575c8c7
* Mon Dec  1 2014 Jerry James <loganjerry@gmail.com> - 1.01-1.hg20141130
Jerry James 575c8c7
- Initial RPM