%bcond_with check
%global testspec_version 3.6.3

Name:           sassc
Version:        3.6.2
Release:        1%{?_dist_release}
Group:          publishing
Summary:        Wrapper around libsass to compile CSS stylesheet
Summary(ja):    libsassのコマンドラインラッパー
Vendor:         Project Vine
Distribution:   Vine Linux

License:        MIT
URL:            http://github.com/sass/sassc
Source0:        https://github.com/sass/sassc/archive/refs/tags/%{version}.tar.gz
# Test suite spec. According to this comment from an upstream dev, we should
# not use the release tags on the test spec:
# https://github.com/sass/libsass/issues/2258#issuecomment-268196004
# https://github.com/sass/sass-spec/archive/master.zip
# https://github.com/sass/sass-spec/archive/v%%{testspec_version}.tar.gz
Source1:        https://github.com/sass/sass-spec/archive/libsass-%{testspec_version}.tar.gz

BuildRequires:  libsass-devel >= %{version}
BuildRequires:  gcc-c++
%if %{with check}
BuildRequires:  ruby
BuildRequires:  rubygem-minitest
BuildRequires:  rubygem-hrx
%endif

%description
SassC is a wrapper around libsass used to generate a useful command-line
application that can be installed and packaged for several operating systems.


%debug_package


%prep
%setup -q -a 1
mv sass-spec-libsass-%{testspec_version} sass-spec
autoreconf -fiv


%build
%configure
%make_build


%install
rm -rf $RPM_BUILD_ROOT
%make_install


%if %{with check}
%check
ruby sass-spec/sass-spec.rb -V 3.6 -c bin/%{name} --impl libsass sass-spec/spec
%endif

%files
%license LICENSE
%doc Readme.md
%{_bindir}/%{name}


%changelog
* Fri Mar 04 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.6.2-1
- new upstream relaase.

* Fri Mar 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.6.1-2
- rebuilt with current environment.

* Fri Aug 30 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.6.1-1
- new upstream relaase.

* Sun Dec 30 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.5.0-2
- initial build for Vine Linux.
- disabled tests.

* Thu Jul 19 2018 Kevin Fenzi <kevin@scrye.com> - 3.5.0-1
- Upgrade to 3.5.0, tests 3.5.4. 
- Fixes FTBFS.

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Jul 24 2017 Aurelien Bompard <abompard@fedoraproject.org> - 3.4.5-2
- Require the same libsass version

* Mon Jul 24 2017 Aurelien Bompard <abompard@fedoraproject.org> - 3.4.5-1
- Version 3.4.5: https://github.com/sass/sassc/releases/tag/3.4.5

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Aurelien Bompard <abompard@fedoraproject.org> - 3.4.1-1
- Version 3.4.1: https://github.com/sass/sassc/releases/tag/3.4.1

* Mon Dec 12 2016 Aurelien Bompard <abompard@fedoraproject.org> - 3.4.0-1
- Version 3.4.0: https://github.com/sass/sassc/releases/tag/3.4.0

* Tue Aug 23 2016 Aurelien Bompard <abompard@fedoraproject.org> - 3.3.6-1
- initial package
