Line 34: |
Line 34: |
| ==== %define version 1.0.0 ==== | | ==== %define version 1.0.0 ==== |
| ==== %define release 02 ==== | | ==== %define release 02 ==== |
| + | |
| ==== Version: %{version} ==== | | ==== Version: %{version} ==== |
− | ==== Release: %{release} ==== | + | ==== Release: %{release}%{?dist} ==== |
| | | |
| # The copyright should be "GPL" for any contrib module you hope to | | # The copyright should be "GPL" for any contrib module you hope to |
| # make available for other SME Server users | | # make available for other SME Server users |
| + | |
| ==== Copyright: GPL ==== | | ==== Copyright: GPL ==== |
| | | |
Line 146: |
Line 148: |
| # A cool way for creating a directory called '''tmp''' during the rpm installation | | # A cool way for creating a directory called '''tmp''' during the rpm installation |
| =====%{__mkdir_p} root/var/lib/packageName/tmp===== | | =====%{__mkdir_p} root/var/lib/packageName/tmp===== |
| + | or |
| + | %{__mkdir} -p $RPM_BUILD_ROOT/var/log/httpd-bkpc |
| | | |
| ===== perl createlinks ===== | | ===== perl createlinks ===== |
Line 163: |
Line 167: |
| # %files section below for how it's actually used | | # %files section below for how it's actually used |
| # A you can see below we set permissions and ownership on files and directories | | # A you can see below we set permissions and ownership on files and directories |
| + | # You can also ignore adding a directory with --ignoredir |
| | | |
| rm -rf $RPM_BUILD_ROOT | | rm -rf $RPM_BUILD_ROOT |
Line 180: |
Line 185: |
| --file /var/service/dhcp-dns/dhcp-dns 'attr(0750,root,root)' \ | | --file /var/service/dhcp-dns/dhcp-dns 'attr(0750,root,root)' \ |
| --file /var/service/dhcp-dns/run 'attr(0750,root,root)' \ | | --file /var/service/dhcp-dns/run 'attr(0750,root,root)' \ |
| + | --ignoredir /etc/sudoers.d \ |
| $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist | | $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist |
| | | |
− | # we can push file to a destination in order to use them after in a mysql.init script for example | + | # we can push file to a destination in order to use them after in a mysql.init script |
− | # my $dbstruct = `rpm -qd smeserver-phpmyadmin | grep phpmyadmin.sql`; | + | # the file needs to be outside of the root/ of your rpm |
| + | # for example : |
| + | # my $dbstruct = `rpm -qd smeserver-packageName | grep packageName.sql`; |
| # /usr/bin/mysql $db < $dbstruct | | # /usr/bin/mysql $db < $dbstruct |
| | | |
| echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist | | echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist |
− | echo "%doc phpmyadmin.sql" >> %{name}-%{version}-filelist | + | echo "%doc packageName.sql" >> %{name}-%{version}-filelist |
− | | |
| | | |
| # Now we have to list all the files that are part of our installed RPM | | # Now we have to list all the files that are part of our installed RPM |