瀏覽代碼

boxes does not work without config file

Christoph Schug 23 年之前
父節點
當前提交
60dd6be4f7
共有 1 個文件被更改,包括 12 次插入3 次删除
  1. 12 3
      boxes/boxes.spec

+ 12 - 3
boxes/boxes.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Text
 License:      GPL
 Version:      1.0.1
-Release:      20020416
+Release:      20030103
 
 #   list of sources
 Source0:      http://boxes.thomasjensen.com/download/boxes-%{version}.src.tar.gz
@@ -56,7 +56,12 @@ AutoReqProv:  no
 
 %prep
     %setup -q
-    %{l_shtool} subst -e 's;-traditional;;' src/regexp/Makefile
+    %{l_shtool} subst \
+        -e 's;^\(GLOBALCONF =\).*$;\1 %{l_prefix}/etc/boxes/boxes.conf;' \
+        Makefile
+    %{l_shtool} subst \
+        -e 's;-traditional;;' \
+        src/regexp/Makefile
 
 %build
     %{l_make} %{l_mflags}
@@ -65,12 +70,16 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/bin \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/boxes \
         $RPM_BUILD_ROOT%{l_prefix}/man/man1
     %{l_shtool} install -c -s -m 755 \
         src/boxes $RPM_BUILD_ROOT%{l_prefix}/bin/
+    %{l_shtool} install -c -m 644 \
+        boxes-config $RPM_BUILD_ROOT%{l_prefix}/etc/boxes/boxes.conf
     %{l_shtool} install -c -m 644 \
         doc/boxes.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
-    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
+        '%config %{l_prefix}/etc/boxes/*'
 
 %files -f files