[Asterisk-Dev] asterisk.spec and the redhat dir

Jason Pyeron jpyeron at pdinc.us
Tue Nov 8 15:16:39 MST 2005


I was about to say the same...

What version scheme are you using?

I am using asterisk-BRANCH.CVSDATE-rev

CVSDATE is a valid date to cvs co against to get the same versions, such 
that the date is the earliest possible date for that file set, hence 
it is unique.

that being said lets trade specs

On Tue, 8 Nov 2005, Joseph Benden wrote:

> I have a modified one that I've continued to update, etc. if your interested. 
> It's built around CentOS 3.x which is the same as RHEL 3  I also have SPECS 
> for the sounds and add-ons, too.
>
> Joseph Benden
> www.AgileVoice.com - Asterisk Billing and Provisioning
>
>
> Kevin P. Fleming wrote:
>
>> Jason Pyeron wrote:
>> 
>>> 
>>> Who is the maintainer for the RedHat aspects of *?
>>> or is it abandoned?
>> 
>> 
>> Nobody in particular. Jeffrey Ollie was posting some patches this summer, 
>> but I haven't seen much from him lately.
>> _______________________________________________
>> Asterisk-Dev mailing list
>> Asterisk-Dev at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-dev
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>> 
>> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-dev
>

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager             7 West 24th Street #100     -
- +1 (443) 269-1555                 Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.
-------------- next part --------------
Version: HEAD.20051108194756
Summary: Asterisk PBX
Name: asterisk
Distribution: RedHat
Release: 0
Copyright: Linux Support Services, inc.
Group: Utilities/System
Vendor: Linux Support Services, inc.
Packager: support at pdinc.us

BuildRoot: %{_tmppath}/%{name}-%{version}-root

#mohmp3
BuildRequires: mpg123 >= 0.59r
Requires: mpg123 >= 0.59r

BuildRequires: make
BuildRequires: gcc
BuildRequires: bison
BuildRequires: openssl-devel

BuildRequires: ncurses-devel
BuildRequires: diffutils

BuildRequires: doxygen

BuildRequires: curl-devel
BuildRequires: flex


#astman
BuildRequires: newt-devel 

#docs
BuildRequires: graphviz >= 2.2
BuildRequires: urw-fonts


Source0: asterisk-%{version}.tgz
Patch0: asterisk-service-%{version}.patch
Patch1: asterisk-varrun-%{version}.patch
Patch2: asterisk-cvsclean-%{version}.patch

%description
Asterisk is an Open Source PBX and telephony development platform that
can both replace a conventional PBX and act as a platform for developing
custom telephony applications for delivering dynamic content over a
telephone similarly to how one can deliver dynamic content through a
web browser using CGI and a web server.

Asterisk talks to a variety of telephony hardware including BRI, PRI, 
POTS, and IP telephony clients using the Inter-Asterisk eXchange
protocol (e.g. gnophone or miniphone).  For more information and a
current list of supported hardware, see www.asteriskpbx.com.

%package        devel
Summary:        Header files for building Asterisk modules
Group:          Development/Libraries
Requires: asterisk

%description devel
This package contains the development  header files that are needed
to compile 3rd party modules.

%package        config
Summary:        Asterisk default config
Group:          Utilities/System
Requires: asterisk

%description config
This package contains the config files that are needed
to run asterisk.

%package        mohmp3-samples
Summary:        Asterisk music on hold samples
Group:          Utilities/System
Requires: asterisk

%description mohmp3-samples
This package contains sample music for moh (music on hold).

%package        docs
Summary:        Asterisk documentation
Group:		Documentation/Other
Requires: asterisk

%description docs
This package contains the asterisk docs.

#docs
BuildRequires: graphviz >= 2.2
BuildRequires: urw-fonts



%prep

%setup -q

%patch0 -p0
%patch1 -p0
%patch2 -p0

%build

make

%install

[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install 
make DESTDIR=$RPM_BUILD_ROOT samples

rm -rf $RPM_BUILD_ROOT/var/spool/asterisk/voicemail/default/1234

mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
cp redhat/asterisk $RPM_BUILD_ROOT/etc/rc.d/init.d/

make DESTDIR=$RPM_BUILD_ROOT progdocs
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/api/html

find doc -type f -maxdepth 1 | xargs cp --target-directory=$RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}

cp -p doc/api/html/*.css  $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/api/html/
cp -p doc/api/html/*.html $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/api/html/
cp -p doc/api/html/*.png  $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/api/html/

mkdir -p $RPM_BUILD_ROOT/var/log/asterisk


mkdir -p /var/log/asterisk/cdr-csv
mkdir -p /var/log/asterisk/cdr-custom


%pre
useradd -u 5060 -d /var/lib/asterisk -c 'Asterisk PBX' asterisk 2> /dev/null || true

%post
ln -sf /var/spool/asterisk/vm /var/lib/asterisk/sounds/vm

%files

#
# RedHat specific init script file
#
%attr(0755,root,root)       /etc/rc.d/init.d/asterisk
%attr(0750,asterisk,asterisk) %dir /var/log/asterisk
%attr(0750,asterisk,asterisk) %dir /var/run/asterisk

#
# Modules
#
%attr(0755,root,root) %dir /usr/lib/asterisk
%attr(0755,root,root) %dir /usr/lib/asterisk/modules
%attr(0755,root,root)      /usr/lib/asterisk/modules/*.so

#
# Asterisk
#
%attr(0755,root,root)      /usr/sbin/asterisk
%attr(0755,root,root)      /usr/sbin/safe_asterisk
%attr(0755,root,root)      /usr/sbin/astgenkey
%attr(0755,root,root)      /usr/sbin/astman
%attr(0755,root,root)      /usr/sbin/autosupport

%attr(0755,root,root)      /usr/sbin/smsq
%attr(0755,root,root)      /usr/sbin/stereorize
%attr(0755,root,root)      /usr/sbin/streamplayer

%attr(0750,asterisk,asterisk) %dir /var/log/asterisk/cdr-csv
%attr(0750,asterisk,asterisk) %dir /var/log/asterisk/cdr-custom


#
# Sound files
#
%attr(0755,root,root) %dir /var/lib/asterisk
%attr(0755,root,root) %dir /var/lib/asterisk/sounds
%attr(0644,root,root)      /var/lib/asterisk/sounds/*.gsm
%attr(0755,root,root) %dir /var/lib/asterisk/sounds/digits
%attr(0644,root,root)      /var/lib/asterisk/sounds/digits/*.gsm
%attr(0755,root,root) %dir /var/lib/asterisk/sounds/letters
%attr(0644,root,root)      /var/lib/asterisk/sounds/letters/*.gsm
%attr(0755,root,root) %dir /var/lib/asterisk/sounds/phonetic
%attr(0644,root,root)      /var/lib/asterisk/sounds/phonetic/*.gsm
%attr(0755,root,root) %dir /var/lib/asterisk/sounds/dictate
%attr(0644,root,root)      /var/lib/asterisk/sounds/dictate/*.gsm
%attr(0755,root,root) %dir /var/lib/asterisk/mohmp3
%attr(0755,root,root) %dir /var/lib/asterisk/images
%attr(0644,root,root)      /var/lib/asterisk/images/*
%attr(0755,root,root) %dir /var/lib/asterisk/keys
%attr(0644,root,root)      /var/lib/asterisk/keys/*
%attr(0755,root,root) %dir /var/lib/asterisk/agi-bin
%attr(0755,root,root) %dir /var/lib/asterisk/agi-bin/*


#
# Firmware
#
%attr(0755,root,root) %dir /var/lib/asterisk/firmware
%attr(0755,root,root) %dir /var/lib/asterisk/firmware/iax
%attr(0755,root,root)      /var/lib/asterisk/firmware/iax/*.bin

#
# Example voicemail files
#
%attr(0755,asterisk,asterisk) %dir /var/spool/asterisk
%attr(0755,asterisk,asterisk) %dir /var/spool/asterisk/voicemail
%attr(0755,asterisk,asterisk) %dir /var/spool/asterisk/voicemail/default
#%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234
#%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234/INBOX
#%attr(0644,root,root)      /var/spool/asterisk/voicemail/default/1234/*.gsm

%files devel
#
# Include files
#
%attr(0755,root,root) %dir %{_includedir}/asterisk
%attr(0644,root,root) %{_includedir}/asterisk/*.h

%files config
#
# Configuration files
#
%attr(0755,asterisk,asterisk) %dir    %{_sysconfdir}/asterisk
%config(noreplace) %attr(0640,asterisk,asterisk) %{_sysconfdir}/asterisk/*.conf
%config(noreplace) %attr(0640,asterisk,asterisk) %{_sysconfdir}/asterisk/*.adsi
%config(noreplace) %attr(0640,asterisk,asterisk) %{_sysconfdir}/asterisk/*.ael


%files docs
#
# Man page
#
%attr(0644,root,root)      /usr/share/man/man8/asterisk.8.gz
%attr(0644,root,root)      /usr/share/man/man8/astgenkey.8.gz
%attr(0644,root,root)      /usr/share/man/man8/autosupport.8.gz
%attr(0644,root,root)      /usr/share/man/man8/safe_asterisk.8.gz

%attr(0644,root,root)      /usr/share/doc/asterisk-%{version}/*
#%attr(0644,root,root) %dir /usr/share/doc/asterisk-1.0.9/api/html
#%attr(0644,root,root)      /usr/share/doc/asterisk-1.0.9/api/html/*


%files mohmp3-samples
%attr(0644,root,root)      /var/lib/asterisk/mohmp3/*


%changelog
* Wed Oct 19 2005 Jason Pyeron <jpyeron at pdinc.us> HEAD-20051016030858.1
- buildreq: curl-devel, flex

* Mon Oct 17 2005 Jason Pyeron <jpyeron at pdinc.us> HEAD-20051016030858.0
- added some log directories

* Mon Oct 17 2005 Jason Pyeron <jpyeron at pdinc.us> HEAD-20051016030858
- updates to patches to track CVS HEAD
- updated pathes to be -p0 patches.
- buildreq: doxygen

* Mon Jul 18 2005 Jason Pyeron <jpyeron at pdinc.us> 1.0.9-7
- moved to /var/run/asterisk

* Mon Jul 18 2005 Jason Pyeron <jpyeron at pdinc.us> 1.0.9-6
- moved useradd to pre, made log dir 750

* Mon Jul 18 2005 Jason Pyeron <jpyeron at pdinc.us> 1.0.9-5
- fixed service, change ownership of files

* Sun Jul 17 2005 Jason Pyeron <jpyeron at pdinc.us> 1.0.9-4
- fixed service, does not mod probe, and uses asterisk user

* Sun Jul 17 2005 Jason Pyeron <jpyeron at pdinc.us> 1.0.9-2
- created primary spec file




More information about the asterisk-dev mailing list