%define vine_version 7.0
%define vine_codename Ausone
%define vine_codename_lsb %(echo %{vine_codename} | sed -e 's/ //g')
%define rh_version 10
%define lsb_version 4.0

# new vine linux release number
%define _dist_release vl%(echo %{vine_version} | cut -f1 -d.)

# (vineseed|vinebeta|vinecr)
%define vineseed 1
#define vinebeta 1
#define vinecr 1

# release=1+, alpha/beta=0.1+, seed=0.0.1+
%define relbase 0.0.2

Summary: Vine Linux release file
Summary(ja): Vine Linux リリースファイル
Name: vine-release
Version: %{vine_version}%{?vinecr:CR}
Release: %{relbase}%{_dist_release}%{?vineseed:.seed}%{?vinebeta:.beta%{vinebeta}}
License: BSD
Group: System Environment/Base
Distribution: Vine Linux
Vendor: Project Vine
Packager: daisuke
BuildRoot: /tmp/%{name}-%{version}-root
BuildArchitectures: noarch
Obsoletes: redhat-release
Provides: redhat-release = %{rh_version}

%description
Vine Linux release file

%description -l ja
Vine Linux リリースファイル

%install
mkdir -p ${RPM_BUILD_ROOT}/etc
echo "Vine Linux %{vine_version} %{?vinecr:CR }%{?vineseed:(+VineSeed) }%{?vinebeta:(BETA) }(%{vine_codename})" > ${RPM_BUILD_ROOT}/etc/vine-release

ln -sf vine-release ${RPM_BUILD_ROOT}/etc/system-release

cat <<EOF > ${RPM_BUILD_ROOT}/etc/os-release
PRETTY_NAME="Vine Linux %{vine_version} %{?vinecr:CR }%{?vineseed:(+VineSeed) }%{?vinebeta:(BETA) }(%{vine_codename})"
NAME="Vine Linux"
VERSION="%{vine_version} %{?vinecr:CR }%{?vineseed:(+VineSeed) }%{?vinebeta:(BETA) }(%{vine_codename})"
ID="vine"
VERSION_ID="%{vine_version}"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:vinelinux:vine:%{vine_version}"
HOME_URL="https://vinelinux.org/"
BUG_REPORT_URL="http://mantis.vinelinux.org/"
EOF

cat <<EOF > ${RPM_BUILD_ROOT}/etc/lsb-release
LSB_VERSION="%{lsb_version}"
DISTRIB_ID="Vine"
DISTRIB_RELEASE="%{version}"
DISTRIB_CODENAME="%{vine_codename_lsb}"
DISTRIB_DESCRIPTION="Vine Linux %{version}"
EOF

%pre
if [ -f /etc/vine-release ]; then
    if [ ! -z "`grep CR /etc/vine-release`" ]; then
        touch /tmp/vine-cr
    fi
fi

%files
%defattr(-,root,root)
/etc/vine-release
/etc/system-release
/etc/os-release
/etc/lsb-release

%changelog
* Sun Oct 29 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0-0.0.2vl7.seed
- added /etc/{os,system}-release.

* Sat Aug 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 7.0-0.0.1vl7.seed
- build for VineSeed(vl7)

* Sat Jul 09 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 6.0-1vl6
- build for Vine Linux 6 release

* Tue Apr 19 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 6.0-0.1vl6.beta
- build for Vine Linux 6 Beta
- add /etc/lsb-version

* Tue Aug 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 6.0-0.0.1vl6.seed
- build for VineSeed (vl6)

* Wed Aug 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0-1vl5
- build for Vine Linux 5 release

* Mon Jul 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0-0.1vl5.beta
- build for Vine Linux 5 Beta

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0-0.0.2vl5.seed
- spec in utf-8

* Tue Mar 18 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0-0.0.1vl5.seed
- build for VineSeed

* Sat Dec 02 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl1.seed
- new upstream release

* Tue Oct 24 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl1
- build for Vine Linux 4.0

* Sat Oct 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl0.beta4
- build for Vine Linux 4.0 BETA4

* Sat Sep 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl0.beta3
- build for Vine Linux 4.0 BETA3

* Fri Sep 01 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl0.beta2
- build for Vine Linux 4.0 BETA2

* Wed Aug 30 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-0vl0.beta1
- build for Vine Linux 4.0 BETA1

* Thu Sep 22 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2-0vl1.seed
- build for VineSeed

* Fri Sep 16 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2CR-0vl1
- Vine Linux 3.2CR

* Thu Aug 18 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2-0vl1
- Vine Linux 3.2

* Sat Oct 30 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1CR-0vl1
- Vine Linux 3.1CR

* Tue Aug 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0-0vl1.seed
- build for VineSeed
- remove redhat-release

* Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0-0vl1
- Vine Linux 3.0

* Sat Jul 24 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.98-0vl1
- Vine Linux 2.98/3.0RC1

* Sat Jul 17 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.96-0vl1
- Vine Linux 2.96

* Tue Jun 29 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.95-0vl1
- Vine Linux 2.95

* Thu Jun 17 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.93-0vl1
- Vine Linux 2.93

* Mon Jun  7 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.92-0vl1
- Vine Linux 2.92

* Thu Apr  4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.91-1
- Vine Linux 2.91

* Tue May 27 2003 Daisuke SUZUKI <daisuke@vinelinux.org> 2.90-1
- Vine Linux 2.90
- include dummy /etc/redhat-release, Obsoletes: redhat-release

* Sun Oct 27 2002 Daisuke SUZUKI <daisuke@vinelinux.org> 2.6-2
- fixed typo :(

* Fri Sep 20 2002 Daisuke SUZUKI <daisuke@vinelinux.org> 2.6-1
- Vine Linux 2.6 release

* Sun Mar 31 2002 Daisuke SUZUKI <daisuke@vinelinux.org> 2.5-1
- Vine Linux 2.5 release

* Sun Jan  6 2002 Daisuke SUZUKI <daisuke@vinelinux.org> 2.4.99-1
- Vine Linux 2.4.99 (2.5beta) release

* Wed Jan 17 2001 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.5-1CR
- Vine Linux 2.1.5CR release

* Fri Dec 15 2000 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1.4-1CR
- Vine Linux 2.1.4CR (Hancom Special Edition) release

* Sat Oct 14 2000 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1-1CR
- Vine Linux 2.1CR release

* Thu Oct 12 2000 Daisuke SUZUKI <daisuke@vinelinux.org> 2.1-1
- Vine Linux 2.1 release

* Tue Oct  3 2000 Daisuke SUZUKI <daisuke@vinelinux.org>
- Vine Linux 2.1beta

* Sun Apr  2 2000 Daisuke SUZUKI <daisuke@vinelinux.org>
- Vine Linux 2.0

* Thu Feb 17 2000 Daisuke SUZUKI <daisuke@vinelinux.org>
- added %post to remove libwcsmbs.so from ld.so.preload

* Tue Jan 25 2000 Daisuke SUZUKI <daisuke@vinelinux.org>
- Vine Linux 2.0 beta

* Mon Jan 10 2000 Daisuke SUZUKI <daisuke@vinelinux.org>
- Vine Linux 2.0 alpha

* Mon Jan 10 2000 Jun Nishii <jun@vinelinux.org>
- added %defattr
- change group

* Sat Jul 17 1999 Hideya Hane <vine@flatout.org>
- sync Vine Linux 1.9

* Fri May 14 1999 Hideya Hane <vine@flatout.org>
- sync Vine Linux 1.1

* Fri Mar 19 1999 Hideya Hane <vine@flatout.org>
- sync Vine Linux 1.0

* Mon Dec 28 1998 Hideya Hane <vine@flatout.org>
- sync Vine Linux 1.0beta

* Mon Oct 16 1998 Hideya Hane <vine@flatout.org>
- sync RHL-5.2

* Mon Oct 10 1998 Hideya Hane <vine@flatout.org>
- add tcl/tk jp
- add tgif

* Mon Oct 10 1998 Hideya Hane <vine@flatout.org>
- initial release

