source: spec/trunk/SPECS/os2tk45.spec@ 1010

Last change on this file since 1010 was 649, checked in by dmik, 10 years ago

spec: os2tk45: Release 4.5.2-2.

File size: 5.0 KB
Line 
1Summary: IBM OS/2 Developer's Toolkit Version 4.5
2Name: os2tk45
3Version: 4.5.2
4Release: 2%{?dist}
5Group: System Environment/Libraries
6License: IBM
7Vendor: bww bitwise works GmbH
8
9%define github_name os2tk45
10%define github_url https://github.com/bitwiseworks/%{github_name}/archive
11%define github_rev 660fdb07c929623bd9043c88f2734f08c741e714
12
13Source: %{github_name}-%{github_rev}.zip
14
15BuildRequires: curl zip
16
17# os2-base 0.0.0-12 sets up BOOK and HELP for UNIXROOT in config.sys
18Requires: os2-base >= 0.0.0-12
19
20# Act like a meta-package and install all essential subpackages
21Requires: %{name}-headers = %{version}
22Requires: %{name}-libs = %{version}
23Requires: %{name}-books = %{version}
24
25%description
26The IBM OS/2 Developer's Toolkit Version 4.5 provides development support
27for new features in the "OS/2 Warp Server for e-business" operating system
28and eComStation.
29
30%package readme
31Summary: IBM OS/2 Developer's Toolkit readme
32BuildArch: noarch
33
34%description readme
35Provides IBM OS/2 Developer's Toolkit readme and changelog files.
36
37%package headers
38Summary: IBM OS/2 Developer's Toolkit headers
39Requires: %{name}-readme = %{version}-%{release}
40BuildArch: noarch
41
42%description headers
43Provides IBM OS/2 Developer's Toolkit header files.
44
45%package libs
46Summary: IBM OS/2 Developer's Toolkit libraries
47Requires: %{name}-readme = %{version}-%{release}
48BuildArch: noarch
49
50%description libs
51Provides IBM OS/2 Developer's Toolkit library files.
52
53%package books
54Summary: IBM OS/2 Developer's Toolkit books
55Requires: %{name}-readme = %{version}-%{release}
56BuildArch: noarch
57
58%description books
59Provides IBM OS/2 Developer's Toolkit book files in INF and HLP formats.
60
61%prep
62%if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
63%setup -n "%{github_name}-%{github_rev}" -q
64%else
65%setup -n "%{github_name}-%{github_rev}" -Tc
66rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
67curl -sSL "%{github_url}/%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip"
68unzip "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d ..
69%endif
70
71%build
72
73%install
74
75mkdir -p %{buildroot}%{_includedir}/os2tk45
76cp -pR h/* %{buildroot}%{_includedir}/os2tk45/
77# copy inc directory inside to avoid one more dir under include
78cp -pR inc %{buildroot}%{_includedir}/os2tk45/
79# remove LIBC stuff, will go to a separate subpackage one day
80rm -rf %{buildroot}%{_includedir}/os2tk45/libc
81# remove SOM stuff, it will go to a separate subpackage one day
82rm %{buildroot}%{_includedir}/os2tk45/wincfg.*h
83rm %{buildroot}%{_includedir}/os2tk45/wp*.*h
84
85mkdir -p %{buildroot}%{_libdir}
86cp -pR lib/* %{buildroot}%{_libdir}/
87# remove LIBC stuff, will go to a separate subpackage one day
88rm %{buildroot}%{_libdir}/libc*.lib
89
90mkdir -p %{buildroot}%{_datadir}/os2/book
91cp -p book/* %{buildroot}%{_datadir}/os2/book/
92
93%files
94
95%files readme
96%doc readme
97%doc changelog
98
99%files headers
100%{_includedir}/os2tk45
101
102%files libs
103%{_libdir}/*.lib
104
105%files books
106%{_datadir}/os2/book/*
107
108%post headers
109if [ "$1" = 1 ] ; then
110# execute only on first install
111%cube {ADDSTRING "%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45\gl;%UNIXROOT%\usr\include\os2tk45;" IN "SET INCLUDE=" (FIRST IFNEW BEFORE ADDBOTTOM RS(%%)} c:\config.sys > NUL
112fi
113
114%postun headers
115if [ "$1" = 0 ] ; then
116# execute only on last uninstall
117%cube {DELSTRING "%UNIXROOT%\usr\include\os2tk45\inc;%UNIXROOT%\usr\include\os2tk45\gl;%UNIXROOT%\usr\include\os2tk45;" IN "SET INCLUDE=" (FIRST RS(%%)} c:\config.sys > NUL
118fi
119
120%post libs
121if [ "$1" = 1 ] ; then
122# execute only on first install
123%cube {ADDSTRING "%UNIXROOT%\usr\lib;" IN "SET LIB=" (FIRST IFNEW BEFORE ADDBOTTOM RS(%%)} c:\config.sys > NUL
124fi
125
126%postun libs
127if [ "$1" = 0 ] ; then
128# execute only on last uninstall
129fi
130
131%post books
132if [ "$1" = 1 ] ; then
133# execute only on first install
134%cube {REPLINE "SET CPREF=" WITH "SET CPREF=CP1.INF+CP2.INF+CP3.INF" (ADDBOTTOM} c:\config.sys > NUL
135%cube {REPLINE "SET GPIREF=" WITH "SET GPIREF=GPI1.INF+GPI2.INF+GPI3.INF+GPI4.INF" (ADDBOTTOM} c:\config.sys > NUL
136%cube {REPLINE "SET MMREF=" WITH "SET MMREF=MMREF1.INF+MMREF2.INF+MMREF3.INF" (ADDBOTTOM} c:\config.sys > NUL
137%cube {REPLINE "SET PMREF=" WITH "SET PMREF=PM1.INF+PM2.INF+PM3.INF+PM4.INF+PM5.INF" (ADDBOTTOM} c:\config.sys > NUL
138%cube {REPLINE "SET WPSREF=" WITH "SET WPSREF=WPS1.INF+WPS2.INF+WPS3.INF" (ADDBOTTOM} c:\config.sys > NUL
139fi
140
141%postun books
142if [ "$1" = 0 ] ; then
143# execute only on last uninstall
144%cube {DELLINE "SET CPREF="} c:\config.sys > NUL
145%cube {DELLINE "SET GPIREF="} c:\config.sys > NUL
146%cube {DELLINE "SET MMREF="} c:\config.sys > NUL
147%cube {DELLINE "SET PMREF="} c:\config.sys > NUL
148%cube {DELLINE "SET WPSREF="} c:\config.sys > NUL
149fi
150
151%changelog
152* Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 4.5.2-2
153- Add libs package.
154- Remove LIBC related files from headers and libraries.
155
156* Wed Jan 27 2016 Dmitriy Kuminov <coding@dmik.org> 4.5.2-1
157- Initial package for Toolkit version 4.5.2.
158- Remove ancient DOS EOF symbol (0x1A) from headers.
Note: See TracBrowser for help on using the repository browser.