Просмотр исходного кода

Substitute hardcoded path and add config and help files.

Ralf S. Engelschall 24 лет назад
Родитель
Сommit
af11e290fb
1 измененных файлов с 24 добавлено и 15 удалено
  1. 24 15
      pgp2/pgp2.spec

+ 24 - 15
pgp2/pgp2.spec

@@ -51,21 +51,20 @@ AutoReq:      no
 AutoReqProv:  no
 AutoReqProv:  no
 
 
 %description
 %description
-    PGP (Pretty Good Privacy) is a public key encryption program
-    originally written by Phil Zimmermann in 1991. This is version
-    %{V_long}, considered a classic PGP by some and out of date by
-    others. However, this version of PGP is absent of questionable
-    security features implemented in more current releases. Because
-    of this, the most paranoid PGP users prefer this classic version.
-    An article at the URL
-    http://senderek.de/security/key-experiments.html explains the
-    questionable security features of newer versions of PGP, and
-    the reasons that PGP %{V_long} might be the most secure
-    version to date.
+    PGP (Pretty Good Privacy) is a public key encryption program originally
+    written by Phil Zimmermann in 1991. This is version %{V_long}, considered
+    a classic PGP by some and outdated by others. However, this version of PGP
+    is absent of questionable security features implemented in more current
+    releases. Because of this, some paranoid PGP users prefer this classic
+    version. An article http://senderek.de/security/key-experiments.html
+    explains the questionable security features of newer versions of PGP, and
+    the reasons that PGP %{V_long} might be the most secure version to date.
 
 
 %prep
 %prep
     %setup -c -n pgp-%{V_long}
     %setup -c -n pgp-%{V_long}
     %{l_prefix}/bin/tar -xf pgp%{V_strip}ii.tar
     %{l_prefix}/bin/tar -xf pgp%{V_strip}ii.tar
+    chmod u+w src/fileio.h
+    %{l_shtool} subst -e 's;\/usr\/local\/lib\/pgp;%{l_prefix}\/etc\/pgp2;' src/fileio.h
 
 
 %build
 %build
     cd src
     cd src
@@ -99,13 +98,23 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
     rm -rf $RPM_BUILD_ROOT
     %{l_shtool} mkdir -f -p -m 755 \
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/bin \
         $RPM_BUILD_ROOT%{l_prefix}/bin \
-        $RPM_BUILD_ROOT%{l_prefix}/man/man1
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2
+
+    #   install program and manpage files
     %{l_shtool} install -c -s -m 755 \
     %{l_shtool} install -c -s -m 755 \
         src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/
         src/pgp $RPM_BUILD_ROOT%{l_prefix}/bin/
     %{l_shtool} install -c -m 644 \
     %{l_shtool} install -c -m 644 \
-        doc/pgp.1 \
-        $RPM_BUILD_ROOT%{l_prefix}/man/man1/
-    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+        doc/pgp.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
+
+    #   install configuration, language, and help files
+    %{l_shtool} install -c -m 644 \
+        config.txt language.txt *.hlp $RPM_BUILD_ROOT%{l_prefix}/etc/pgp2/
+
+    #   determine installation files and mark configs
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+        %{l_files_std} \
+        '%config %{l_prefix}/etc/pgp2/config.txt'
 
 
 %files -f files
 %files -f files