netatalk-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. %bcond_with systemd
  2. %global tracker_api 2.0
  3. ################################################# BASIC PACKAGE INFORMATION
  4. Summary: AFP fileserver for Macintosh clients
  5. Summary(ja): Macintoshクライアント向けのAFPファイルサーバー
  6. Name: netatalk
  7. Version: 3.1.12
  8. Release: 2%{_dist_release}%{?with_systemd:.systemd}
  9. Group: System Environment/Daemons
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. Packager: shaolin, tomop
  13. License: GPLv2+
  14. URL: http://netatalk.sourceforge.net/
  15. Source0: %{name}-%{version}.tar.bz2
  16. Source1: netatalk.pam-system-auth
  17. Source2: netatalk.conf
  18. Patch0: netatalk-3.0.1-basedir.patch
  19. Patch1: netatalk-systemd-execstartpre.patch
  20. # https://github.com/Netatalk/Netatalk/pull/110
  21. Patch2: netatalk-fix-incorrect-fsf-address.patch
  22. # https://github.com/Netatalk/Netatalk/pull/113
  23. Patch3: netatalk-afpstats-python3-compat.patch
  24. # https://github.com/Netatalk/Netatalk/pull/125
  25. Patch4: netatalk-invalid_dircache_entries.patch
  26. ############################################################## REQUIREMENTS
  27. BuildRequires: cracklib openssl-devel pam quota libtool automake
  28. BuildRequires: autoconf libdb-devel pam-devel tcp_wrappers libgcrypt-devel
  29. BuildRequires: avahi-devel libacl-devel openldap-devel
  30. BuildRequires: dbus-devel dbus-glib-devel glib2-devel systemtap-sdt-devel
  31. BuildRequires: libevent-devel libtdb-devel libmysqlclient-devel
  32. BuildRequires: python3-rpm-macros
  33. BuildRequires: tracker-devel
  34. Requires: dbus-python3
  35. Requires: dconf
  36. Requires(post): /sbin/ldconfig
  37. Requires(postun): /sbin/ldconfig
  38. %if %{with systemd}
  39. BuildRequires: systemd
  40. %{?systemd_requires}
  41. %else
  42. Requires(post): /sbin/chkconfig
  43. Requires(preun): /sbin/chkconfig
  44. Requires(preun): /sbin/service
  45. Requires(postun): /sbin/service
  46. %endif
  47. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  48. %description
  49. Netatalk is a freely-available Open Source AFP fileserver. A *NIX/*BSD
  50. system running Netatalk is capable of serving many Macintosh clients
  51. simultaneously as an AppleShare file server (AFP).
  52. %description -l ja
  53.  Netatalkは自由に利用可能なオープンソースAFPファイルサーバーです。
  54. Netatalkを実行している*NIX/*BSDシステムでは、多くのMacintoshクライ
  55. アントに対してAppleShareファイルサーバー(AFP)としてサービスを提供
  56. 可能です。
  57. %package devel
  58. Group: Development/Libraries
  59. Summary: Headers for Netatalk development
  60. Summary(ja): Netatalk開発用ヘッダファイル
  61. %description devel
  62. This package contains the header files for Netatalk.
  63. %prep
  64. %setup -q
  65. %autopatch -p1
  66. rm -frv libevent/
  67. ln -s ./NEWS ChangeLog
  68. # Avoid re-running the autotools
  69. touch -r aclocal.m4 configure configure.ac macros/gssapi-check.m4
  70. # fix permissions
  71. find include \( -name '*.h' -a -executable \) -exec chmod -x {} \;
  72. # Don't call systemctl daemon-reload during the build
  73. sed -i 's\-systemctl daemon-reload\\g' distrib/initscripts/Makefile.in
  74. %build
  75. %ifnarch x86_64
  76. export CFLAGS=$(echo '%{optflags}' -fPIE | sed -e 's|-O2|-O0|')
  77. %else
  78. export CFLAGS="%{optflags} -fPIE"
  79. %endif
  80. export LDFLAGS="-pie -Wl,-z,relro,-z,now,-z,noexecstack"
  81. %configure \
  82. --disable-silent-rules \
  83. --disable-static \
  84. --enable-shared \
  85. --localstatedir=%{_localstatedir}/lib \
  86. --with-pkgconfdir=%{_sysconfdir}/netatalk \
  87. --with-cracklib \
  88. --with-pam \
  89. --with-shadow \
  90. --with-uams-path=%{_libdir}/netatalk \
  91. --enable-shared \
  92. --enable-krbV-uam \
  93. --enable-overwrite \
  94. --with-gnu-ld \
  95. %if %{with systemd}
  96. --with-lockfile=/run/lock/netatalk/netatalk \
  97. --with-init-style=redhat-systemd \
  98. --with-init-dir=%{_unitdir} \
  99. %else
  100. --with-init-style=redhat-sysv \
  101. %endif
  102. --with-libgcrypt \
  103. --without-libevent \
  104. --without-tdb \
  105. --with-pam-confdir=%{_sysconfdir}/pam.d \
  106. --with-dbus-sysconf-dir=%{_sysconfdir}/dbus-1/system.d \
  107. -with-spotlight \
  108. --with-tracker-pkgconfig-version=%{tracker_api}
  109. make %{?_smp_mflags} all
  110. %install
  111. ### INSTALL (USING "make install") ###
  112. rm -rf ${RPM_BUILD_ROOT}
  113. make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
  114. # install our tmpfiles config
  115. install -Dpm644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/netatalk.conf
  116. # install example config files in doc
  117. mkdir config.example
  118. cp -fp config/afp.conf config.example
  119. cp -fp config/extmap.conf config.example
  120. mkdir -p $RPM_BUILD_ROOT/usr/share/netatalk
  121. cp -fp %{SOURCE1} config.example
  122. # XXX bad hack until this file is updated in glibc-headers:
  123. rm -f $RPM_BUILD_ROOT/usr/include/netatalk/at.h
  124. # Clean up .a and .la files
  125. find $RPM_BUILD_ROOT -name \*.a -exec rm {} \;
  126. find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;
  127. # Fix python shebang
  128. sed -i 's\^#!/usr/bin/env python$\#!%{__python3}\' %{buildroot}/usr/bin/afpstats
  129. %clean
  130. rm -rf ${RPM_BUILD_ROOT}
  131. %post
  132. if [ -e /var/netatalk/afp_signature.conf -a ! -e /var/lib/netatalk/afp_signature.conf ]; then
  133. mv -f /var/netatalk/afp_signature.conf /var/lib/netatalk/
  134. fi
  135. if [ -e /etc/netatalk/afp_signature.conf -a ! -e /var/lib/netatalk/afp_signature.conf ]; then
  136. mv -f /etc/netatalk/afp_signature.conf /var/lib/netatalk/
  137. fi
  138. if [ -e /var/netatalk/afp_voluuid.conf -a ! -e /var/lib/netatalk/afp_voluuid.conf ]; then
  139. mv -f /var/netatalk/afp_voluuid.conf /var/lib/netatalk/
  140. fi
  141. if [ -e /etc/netatalk/afp_voluuid.conf -a ! -e /var/lib/netatalk/afp_voluuid.conf ]; then
  142. mv -f /etc/netatalk/afp_voluuid.conf /var/lib/netatalk/
  143. fi
  144. %if %{with systemd}
  145. %systemd_post %{name}.service
  146. %else
  147. /sbin/chkconfig --add netatalk
  148. %endif
  149. /sbin/ldconfig
  150. %preun
  151. %if %{with systemd}
  152. %systemd_preun %{name}.service
  153. %else
  154. if [ "$1" = "0" -o -x /bin/systemctl ] ; then
  155. # check for existence due to renaming initscript
  156. if [ -x %{_initrddir}/netatalk ] ; then
  157. /sbin/service netatalk stop > /dev/null 2>&1
  158. /sbin/chkconfig --del netatalk
  159. fi
  160. fi
  161. %endif
  162. %postun
  163. %if %{with systemd}
  164. %systemd_postun_with_restart %{name}.service
  165. %else
  166. if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
  167. /sbin/service netatalk condrestart > /dev/null 2>&1 || :
  168. fi
  169. %endif
  170. /sbin/ldconfig
  171. %files
  172. %defattr(-,root,root)
  173. %license COPYING COPYRIGHT
  174. %doc NEWS
  175. %doc config.example
  176. %if %{with systemd}
  177. %{_unitdir}/netatalk.service
  178. %{_tmpfilesdir}/netatalk.conf
  179. %else
  180. %attr(755,root,root) %{_initrddir}/netatalk
  181. %endif
  182. %dir %{_sysconfdir}/netatalk
  183. %config(noreplace) %{_sysconfdir}/netatalk/afp.conf
  184. %config(noreplace) %{_sysconfdir}/netatalk/extmap.conf
  185. %config(noreplace) %{_sysconfdir}/netatalk/dbus-session.conf
  186. %config(noreplace) %{_sysconfdir}/pam.d/netatalk
  187. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf
  188. %{_sbindir}/*
  189. %{_bindir}/*
  190. %exclude %{_bindir}/netatalk-config
  191. %{_mandir}/man*/*
  192. %exclude %{_mandir}/man*/netatalk-config*
  193. %{_datadir}/netatalk
  194. %{_libdir}/*.so
  195. %{_libdir}/*.so.*
  196. %dir %{_libdir}/netatalk
  197. %{_libdir}/netatalk/*.so
  198. %{_localstatedir}/lib/netatalk
  199. %files devel
  200. %defattr(-,root,root)
  201. %license COPYING COPYRIGHT
  202. %dir %{_includedir}/atalk
  203. %attr(0644,root,root) %{_includedir}/atalk/*
  204. %{_datadir}/aclocal/netatalk.m4
  205. %{_bindir}/netatalk-config
  206. %{_mandir}/man*/netatalk-config.1*
  207. %changelog
  208. * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.12-2
  209. - rebuilt with libevent-2.1.11.
  210. - added systemd support (disabled as default).
  211. * Mon Jan 07 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.12-1
  212. - new upstream release.
  213. * Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.11-2
  214. - rebuilt with openssl-1.1.1 and libevent-2.1.8.
  215. * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.11-1
  216. - new upstream release.
  217. * Wed Jul 20 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.9-1
  218. - new upstream release.
  219. - dropped Patch1: fixed in upstream.
  220. * Wed Dec 30 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.8-2
  221. - added Patch1.
  222. * Wed Dec 30 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.8-1
  223. - new upstream release.
  224. * Tue Jun 16 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.7-1
  225. - new upstream release.
  226. * Mon Dec 1 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.2.2-2
  227. - rebuilt with libgcrypt 1.6.0 and libdb 5.3.28
  228. * Thu Apr 26 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.2.2-1
  229. - new upstream release.
  230. - added build option 'force_uidgid'.
  231. * Sun Sep 18 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.1-1
  232. - new upstream release
  233. - fix configure options; add missing BRs
  234. * Thu Jul 28 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-3
  235. - now back from the upstream confusion (and one more or two...)
  236. new upstream release 2.2.0 at the official site
  237. * Mon Jul 25 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-2
  238. - fix Patch10 to follow HAT-san's strong and confident objection
  239. (no need to set ATALK_NAME explicitly in netatalk.conf)
  240. * Sat Jul 23 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-1
  241. - new upstream release (at http://www003.upp.so-net.ne.jp/hat/netatalk/)
  242. - add Source100 to add one missing header file in the tarball
  243. - revise Patch10
  244. - explicitly specify --disable-ddp for the first time
  245. * Wed May 04 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.5-1
  246. - new upstream release
  247. * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.1.3-3
  248. - rebuild with openssl-1.0.0c
  249. * Sun Jul 25 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.3-2
  250. - fix Patch10 & update description - upon HAT-san's suggestions
  251. * Sun Jul 25 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.3-1
  252. - new upstream release
  253. - update Vine patch
  254. * Thu Feb 11 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.5-1
  255. - new upstream release
  256. * Sun May 31 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.4-1
  257. - new upstream release
  258. * Sun Mar 8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.3-7
  259. - rebuilt both for VineSeed / VinePlus-4.0
  260. * Fri Jul 25 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-6
  261. - updated to the cjk-6 patch
  262. - Patch11/12 updated - VineSeed is now set with ja_JP.UTF-8 locale
  263. - Patch14 updated for db46
  264. * Sun Apr 20 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-5
  265. - remove openslp dependency
  266. * Tue Apr 15 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-4
  267. - add Patch11 for Vine's default setting (volcharset:EUC-JP, etc.)
  268. - TODO: remember to revise this fix after VineSeed changes default locale
  269. from ja_JP.eucJP (current) to ja_JP.UTF-8 (near future)
  270. * Tue Apr 15 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-3
  271. - revise description (thanks HAT-san for pointing this out)
  272. - run libtoolize/aclocal/auto{make,conf,header} before doing configure
  273. (without this, uams_* modules won't get .so suffix)
  274. * Mon Apr 14 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-2
  275. - Patch10 updated; dropped Patch11, Patch12, Source10 and Source11
  276. (Patch10 now includes all the modifications and more fixes)
  277. * Fri Apr 11 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.0.3-1
  278. - add patch13 and patch14 for db-4.3.
  279. - move files in %%_libexecdir to %%libdir.
  280. * Sat Oct 21 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-0vl1
  281. - updated to 2.0.3 release w/ cjk patches (see the above Patch section)
  282. * Tue Oct 19 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl4
  283. - security fix: added Patch10 (CAN-2004-0974)
  284. * Tue Oct 19 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl3
  285. - configure --with-cnid-default-backend=dbd (cdb seems to be unstable)
  286. * Wed Oct 13 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl1
  287. - updated to 2.0 with cjk patch
  288. (see the above Patch section for details)
  289. * Tue May 28 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl4
  290. - merge the patch repairing bug for System 7.5.5
  291. - (patch6 netatalk-1.5.3.oldsys.patch)
  292. - made by Akihiro Okamaoto <med012@art.osaka-med.ac.jp>
  293. - patch6 addupted no matter noeuc is, license GPL, URL in comment
  294. * Sat Apr 27 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl3
  295. - euc and kana patch originally by
  296. - Akihiro Okamoto <med012@art.osaka-med.ac.jp> against netatalk-1.4b2+asun2.1.3
  297. - applied to netatalk-1.5.2 by me
  298. - README.vine
  299. - omit VERSION from doc, omit perl from require
  300. * Wed Apr 24 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl2
  301. - this package is removed because the release number duplicated
  302. * Mon Apr 01 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.3.1-0vl2
  303. - move acleandir.rc to the doc directory, remove executable flag.
  304. * Sun Mar 31 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.3.1-0vl1
  305. - updated to new upstream release
  306. * Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 1.5.2-0vl3
  307. - added Japanese Summary for devel and corrected Group
  308. * Thu Feb 28 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.2-0vl2
  309. - Oops, check /var/lock/atalkd instead of /var/run/atd.pid
  310. (say atd.pid doesn't have anything to do with netatalk!!)
  311. * Tue Feb 26 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.2-0vl1
  312. - updated to new upstream release
  313. * Thu Feb 07 2002 Toru Sagami <sagami@vinelinux.org> 1.5.1.1-0vl3
  314. - install man pages into %%{_mandir}
  315. - PreReq: /sbin/chkconfig /sbin/ldconfig grep textutils
  316. - let pre script exit 0
  317. * Thu Feb 07 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.1.1-0vl2
  318. - spec cleanup
  319. - backup old prefs directory (/etc/atalk -> /etc/netatalk/00OLD_VERSION_PREFS)
  320. - restart atalk daemons in the %%post section
  321. * Sun Feb 3 2002 k hanai <hanai@koto.kpu-m.ac.jp>
  322. - v1.5.1.1-0vl1
  323. * Fri Jan 25 2002 k hanai <hanai@koto.kpu-m.ac.jp>
  324. - v1.5.0-0vl1
  325. - release 1.5.0 for sourceforge
  326. * Thu Apr 12 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  327. - v1.5pre6-1rh7
  328. - pre-release 6 for sourceforge
  329. * Wed Mar 07 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  330. - v1.5pre5-1
  331. - pre-release 5 for sourceforge
  332. * Fri Feb 23 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  333. - v1.5pre5-0
  334. - pre-release 5 for sourceforge (prebuild)
  335. * Tue Feb 20 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  336. - v1.5pre4-1
  337. - pre-release 4 for sourceforge
  338. - modified/split mandrake spec for redhat 7 build
  339. * Mon Dec 18 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  340. - v1.5pre3-1mdk
  341. - pre-release 3 for sourceforge
  342. - moved away from 1.4.99 ...
  343. * Wed Nov 08 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  344. - v1.4.99-0.20001108mdk
  345. - pre-release 2 for sourceforge
  346. * Wed Sep 27 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  347. - v1.4.99-0.20000927mdk
  348. - pre-release 1 for sourceforge