/[smeserver]/rpms/timeobjects/sme10/timeobjects.spec
ViewVC logotype

Diff of /rpms/timeobjects/sme10/timeobjects.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by unnilennium, Thu Jun 16 16:06:12 2016 UTC Revision 1.4 by unnilennium, Fri Jun 17 11:23:58 2016 UTC
# Line 1  Line 1 
1  %define peardir /usr/share/pear  %define peardir /usr/share/pear
2  %define xmldir  /var/lib/pear  %define xmldir  /var/lib/pear
3    %{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
4    %{!?__pear:       %global __pear       %{_bindir}/pear}
5    %global pear_name    timeobjects
6    %global pear_channel pear.horde.org
7    %define name timeobjects
8    %define version 2.1.2
9    %define release 3
10    
11    Name: %{name}
12    Version: %{version}
13    Release: %{release}%{?dist}
14  Summary: PEAR: Horde timeobjects application  Summary: PEAR: Horde timeobjects application
 Name: timeobjects  
 Version: 2.1.2  
 Release: 1%{?dist}  
15  License: BSD-2-Clause  License: BSD-2-Clause
16  Group: Development/Libraries  Group: Development/Libraries
17  Source0: http://pear.horde.org/get/timeobjects-%{version}.tgz  Source0: http://pear.horde.org/get/timeobjects-%{version}.tgz
18  BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)  BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
19  URL: http://pear.horde.org/package/timeobjects  URL: http://pear.horde.org/package/timeobjects
20  BuildRequires:       php-pear(PEAR) >= 1.4.7  BuildRequires:       php-pear(PEAR) >= 1.4.7
21  #BuildRequires: php-channel(pear.horde.org)  BuildRequires: php-channel(pear.horde.org)
22  Requires: Horde_Role >= 1.0.0  Requires: php-horde-Horde-Role >= 1.0.0
23  Requires: Horde_Core >= 2.0.0  Requires: php-horde-Horde-Core >= 2.0.0
24  Requires: Horde_Core < 3.0.0alpha1  Requires: php-horde-Horde-Core < 3.0.0alpha1
25  Requires: Horde_Date >= 2.0.0  Requires: php-horde-Horde-Date >= 2.0.0
26  Requires: Horde_Date < 3.0.0alpha1  Requires: php-horde-Horde-Date < 3.0.0alpha1
27  Requires: Horde_Exception >= 2.0.0  Requires: php-horde-Horde-Exception >= 2.0.0
28  Requires: Horde_Exception < 3.0.0alpha1  Requires: php-horde-Horde-Exception < 3.0.0alpha1
29  Requires: Horde_Url >= 2.0.0  Requires: php-horde-Horde-Url >= 2.0.0
30  Requires: Horde_Url < 3.0.0alpha1  Requires: php-horde-Horde-Url < 3.0.0alpha1
31  Requires: Horde_Util >= 2.0.0  Requires: php-horde-Horde-Util >= 2.0.0
32  Requires: Horde_Util < 3.0.0alpha1  Requires: php-horde-Horde-Util < 3.0.0alpha1
33  Requires: php-pear(PEAR) >= 1.7.0  Requires: php-pear(PEAR) >= 1.7.0
34  #Requires: php-channel(pear.horde.org)  Requires: php-channel(pear.horde.org)
35  BuildArch: noarch  BuildArch: noarch
36  BuildRequires: php-horde-Horde-Role  BuildRequires: php-horde-Horde-Role
37  BuildRequires: php-channel-horde  BuildRequires: php-channel-horde
38  Requires: php-channel-horde  Requires: php-channel-horde
39    BuildRequires:  gettext
40  Provides:       %{name} = %{version}  Provides:       %{name} = %{version}
41    
42  %description  %description
# Line 38  calendar application. It contains driver Line 46  calendar application. It contains driver
46  forecasts and can easily be extended by custom drivers.  forecasts and can easily be extended by custom drivers.
47    
48  %prep  %prep
49  %setup -c -T  %setup -q -c
50  pear -v -c pearrc \  cd %{pear_name}-%{version}
51          -d php_dir=%{peardir} \  
52          -d doc_dir=%{pear_docdir} \  # Don't install .po and .pot files
53          -d bin_dir=%{_bindir} \  # Remove checksum for .mo, as we regenerate them
54          -d data_dir=%{peardir}/data \  sed -e '/%{pear_name}.po/d' \
55          -d test_dir=%{peardir}/tests \      -e '/Horde_Other.po/d' \
56          -d ext_dir=%{_libdir} \      -e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \
57          -d horde_dir=%{pear_hordedir} \      ../package.xml >%{name}.xml
58          -s  touch -r ../package.xml %{name}.xml
59    
60    
61  %build  %build
62    cd %{pear_name}-%{version}
63    
64    # Regenerate the locales
65    for po in $(find locale -name \*.po)
66    do
67       msgfmt $po -o $(dirname $po)/$(basename $po .po).mo
68    done
69    
70    
71  %install  %install
72  rm -rf %{buildroot}  cd %{pear_name}-%{version}
73  pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}  %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
74            
75  # Clean up unnecessary files  # Clean up unnecessary files
76  rm pearrc  rm -rf %{buildroot}%{pear_metadir}/.??*
 rm %{buildroot}/%{peardir}/.filemap  
 rm %{buildroot}/%{peardir}/.lock  
 rm -rf %{buildroot}/%{peardir}/.registry  
 rm -rf %{buildroot}%{peardir}/.channels  
 rm %{buildroot}%{peardir}/.depdb  
 rm %{buildroot}%{peardir}/.depdblock  
77    
78  #mv %{buildroot}/docs .  # Install XML package description
79    mkdir -p %{buildroot}%{pear_xmldir}
80    install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
81    
82    # Locales
83    for loc in locale/{??,??_??}
84    do
85        lang=$(basename $loc)
86        test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \
87             && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc"
88    done | tee ../%{pear_name}.lang
89    
 # Install XML package description  
 mkdir -p %{buildroot}%{xmldir}  
 tar -xzf %{SOURCE0} package.xml  
 cp -p package.xml %{buildroot}%{xmldir}/timeobjects.xml  
90    
 %clean  
 rm -rf %{buildroot}  
91    
92  %post  %post
93  pear install --nodeps --soft --force --register-only %{xmldir}/timeobjects.xml >/dev/null || :  %{__pear} install --nodeps --soft --force --register-only \
94        %{pear_xmldir}/%{name}.xml >/dev/null || :
95    
96  %postun  %postun
97  if [ "$1" -eq "0" ]; then  if [ $1 -eq 0 ] ; then
98      pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/timeobjects >/dev/null || :      %{__pear} uninstall --nodeps --ignore-errors --register-only \
99            %{pear_channel}/%{pear_name} >/dev/null || :
100  fi  fi
101    
102  %files  
103    %files -f %{pear_name}.lang
104  %defattr(-,root,root)  %defattr(-,root,root)
 #%doc docs/timeobjects/*  
105  %doc %{pear_hordedir}  %doc %{pear_hordedir}
106  %{peardir}/*  %{pear_xmldir}/timeobjects.xml
107  %{xmldir}/timeobjects.xml  %doc %{pear_docdir}/%{pear_name}
108    
109  %changelog  %changelog
110    * Fri Jun 17 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.1.2-3.sme
111    - new spec file to build in SME buildsys
112    - inspired from Remi Collet php-horde-Service-Weather
113    - [SME: 9601]
114    - add gettext as buildrequires (bump 3)
115    
116  * Tue Apr 5 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.2-1  * Tue Apr 5 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.2-1
117  - Update to 2.1.2  - Update to 2.1.2
118    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed