/[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.3 by unnilennium, Fri Jun 17 11:14:03 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 2
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
# Line 38  calendar application. It contains driver Line 45  calendar application. It contains driver
45  forecasts and can easily be extended by custom drivers.  forecasts and can easily be extended by custom drivers.
46    
47  %prep  %prep
48  %setup -c -T  %setup -q -c
49  pear -v -c pearrc \  cd %{pear_name}-%{version}
50          -d php_dir=%{peardir} \  
51          -d doc_dir=%{pear_docdir} \  # Don't install .po and .pot files
52          -d bin_dir=%{_bindir} \  # Remove checksum for .mo, as we regenerate them
53          -d data_dir=%{peardir}/data \  sed -e '/%{pear_name}.po/d' \
54          -d test_dir=%{peardir}/tests \      -e '/Horde_Other.po/d' \
55          -d ext_dir=%{_libdir} \      -e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \
56          -d horde_dir=%{pear_hordedir} \      ../package.xml >%{name}.xml
57          -s  touch -r ../package.xml %{name}.xml
58    
59    
60  %build  %build
61    cd %{pear_name}-%{version}
62    
63    # Regenerate the locales
64    for po in $(find locale -name \*.po)
65    do
66       msgfmt $po -o $(dirname $po)/$(basename $po .po).mo
67    done
68    
69    
70  %install  %install
71  rm -rf %{buildroot}  cd %{pear_name}-%{version}
72  pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}  %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
73            
74  # Clean up unnecessary files  # Clean up unnecessary files
75  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  
76    
77  #mv %{buildroot}/docs .  # Install XML package description
78    mkdir -p %{buildroot}%{pear_xmldir}
79    install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
80    
81    # Locales
82    for loc in locale/{??,??_??}
83    do
84        lang=$(basename $loc)
85        test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \
86             && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc"
87    done | tee ../%{pear_name}.lang
88    
 # Install XML package description  
 mkdir -p %{buildroot}%{xmldir}  
 tar -xzf %{SOURCE0} package.xml  
 cp -p package.xml %{buildroot}%{xmldir}/timeobjects.xml  
89    
 %clean  
 rm -rf %{buildroot}  
90    
91  %post  %post
92  pear install --nodeps --soft --force --register-only %{xmldir}/timeobjects.xml >/dev/null || :  %{__pear} install --nodeps --soft --force --register-only \
93        %{pear_xmldir}/%{name}.xml >/dev/null || :
94    
95  %postun  %postun
96  if [ "$1" -eq "0" ]; then  if [ $1 -eq 0 ] ; then
97      pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/timeobjects >/dev/null || :      %{__pear} uninstall --nodeps --ignore-errors --register-only \
98            %{pear_channel}/%{pear_name} >/dev/null || :
99  fi  fi
100    
101  %files  
102    %files -f %{pear_name}.lang
103  %defattr(-,root,root)  %defattr(-,root,root)
 #%doc docs/timeobjects/*  
104  %doc %{pear_hordedir}  %doc %{pear_hordedir}
105  %{peardir}/*  %{pear_xmldir}/timeobjects.xml
106  %{xmldir}/timeobjects.xml  %doc %{pear_docdir}/%{pear_name}
107    
108  %changelog  %changelog
109    * Fri Jun 17 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.1.2-2.sme
110    - new spec file to build in SME buildsys
111    - inspired from Remi Collet php-horde-Service-Weather
112    - [SME: 9601]
113    
114  * 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
115  - Update to 2.1.2  - Update to 2.1.2
116    


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