# golang-github-macaron-session.spec # Generated by go2rpm %bcond_without check # https://github.com/go-macaron/session %global goipath github.com/go-macaron/session %global commit 0a0a789bf1934e55fde19629869caa015a40c525 %gometa %global common_description %{expand: Middleware session provides session management for Macaron. It can use many session providers, including memory, file, Redis, Memcache, PostgreSQL, MySQL.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Version: 0 Release: 0.2%{?dist} Summary: Middleware that provides the session management of Macaron # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} # disable uncommon databases like nodb and ledis - not packaged Patch0: drop-exotic-dbs.patch # ensure tests use in-memory databases and on non-default ports Patch1: local-tests-dbs.patch BuildRequires: golang(github.com/bradfitz/gomemcache/memcache) BuildRequires: golang(github.com/go-sql-driver/mysql) BuildRequires: golang(github.com/lib/pq) BuildRequires: golang(github.com/Unknwon/com) BuildRequires: golang(gopkg.in/ini.v1) BuildRequires: golang(gopkg.in/macaron.v1) BuildRequires: golang(gopkg.in/redis.v2) # perform testing on in-memory databases BuildRequires: redis memcached nmap-ncat net-tools procps %if %{with check} # Tests BuildRequires: golang(github.com/smartystreets/goconvey/convey) %endif %description %{common_description} %gopkg %prep %goprep %patch0 -p1 %patch1 -p1 %install %gopkginstall %if %{with check} %check # stop any pre-existing redis and memcached servers running printf "shutdown\r\nquit\r\n" | ncat localhost 8131 2>/dev/null || true redis-cli -p 8130 shutdown 2>/dev/null || true # start temporary redis and memcached instances for testing memcached -A --port 8131 & redis-server --port 8130 & sleep 0.5 # give these test services some time to startup echo "-- Server processes" ps aux | egrep 'redis-server|memcached' echo "-- Server ports" netstat -tulnp | egrep '8130|8131' # run the actual tests echo "-- Run tests" %gocheck echo "-- Done" # stop both the newly-created redis and memcached instances printf "shutdown\r\nquit\r\n" | ncat localhost 8131 redis-cli -p 8130 shutdowm %endif %gopkgfiles %changelog * Tue Jun 04 01:20:49 CEST 2019 Robert-André Mauchin - 0-0.2.20190328git0a0a789 - Update to new macros * Thu Mar 28 2019 Nathan Scott - 0-0.1.20190328git0a0a789 - First package for Fedora